我有一个关于PHP包含路径的问题,它在两个环境中的行为不同。
文件夹结构:
Windows
|-C:\wamp\www\cms\themes\child
|-C:\wamp\www\cms\themes\parent
Linux
|-/var/www/html/cms/themes/child
|-/var/www/html/cms/themes/parent
Linux环境
var_dump(realpath('/')); // means /
var_dump(realpath('/../parent/scripts/import.php')); //boo