我有一个项目文件,并且是简单的结构
home/index.php
folder_1/file1.php
folder_2/file2.php
如果在file1.php中,我使用" require(' ../ index.php');"它的工作, 但为什么我不能在file2.php使用相同的sytax?
这是一个错误:
[01-Feb-2017 03:02:58 UTC] PHP Warning: require(../index.php): failed to open stream: No such file or directory in /home/lingga/public_html/folder_1/file1.php on line 2
[01-Feb-2017 03:02:58 UTC] PHP Fatal error: require(): Failed opening required '../index.php' (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/lingga/public_html/administrator/php/config/aplication-pack.php on line 2