0
我已將CodeIgniter安裝到/usr/share/pear/codeigniter
中。如果我在我的應用程序中設置index.php
Codeigniter錯誤的系統文件夾路徑
$system_path = '/usr/share/pear/codeigniter/system';
它可以正常工作。
但是,當我mount --bind
或複製到/pub/codeigniter
,並設置$system_path
到/pub/codeigniter/system
,不工作,CI顯示一條錯誤消息:
Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php
權限:
$ ls -ld /usr/share/pear/codeigniter/{,*}
drwxr-xr-x 4 root root 4096 febr 17 13.07 /usr/share/pear/codeigniter/
drwxr-xr-x 15 root root 4096 febr 17 13.07 /usr/share/pear/codeigniter/application
-rw-r--r-- 1 root root 6357 febr 17 13.07 /usr/share/pear/codeigniter/index.php
drwxr-xr-x 8 root root 4096 febr 17 13.07 /usr/share/pear/codeigniter/system
$ ls -ld /pub/codeigniter/{,*}
drwxr-xr-x 4 root root 4096 júl 15 13.20 /pub/codeigniter/
drwxr-xr-x 15 root root 4096 febr 17 13.07 /pub/codeigniter/application
-rw-r--r-- 1 root root 6357 febr 17 13.07 /pub/codeigniter/index.php
drwxr-xr-x 8 root root 4096 júl 15 13.20 /pub/codeigniter/system
我覺得PHP的is_dir
函數失敗,但我不知道爲什麼。
有什麼建議嗎?
您是否嘗試過自己調用'is_dir'來檢查? – mnagel
在'index.php'中有'is_dir'檢查:https://github.com/EllisLab/CodeIgniter/blob/develop/index.php#L191'var_dump(is_dir($ system_path))'prints' bool(假)'。 '$ system_path'存儲正確的值('echo $ system_path'打印出好的輸出)。 – uzsolt