在此处的 codeigniter 安装指南 中,它说为了获得最佳安全性,系统和应用程序文件夹应设置在 web 根目录之上。我有点喜欢这个主意,所以我试了一下。
在 byethost 示例中,它与 htdocs 位于同一文件夹中(我认为)
我通过 echo $_SERVER['DOCUMENT_ROOT']; 获得了服务器路径 所以我的类似于:/home/vol8/byethost17.com/my_username/htdocs
所以我尝试将路径放在 index.php 中
$application_folder = 'home/vol8/byethost17.com/my_username/application';
$system_path = 'home/vol8/byethost17.com/my_username/system';
但它没有用
Your system folder path does not appear to be set correctly.
Please open the following file and correct this: index.php
与应用程序文件夹相同吗?
有人可以帮我正确设置吗?
编辑:
细节:
主机 php 版本:5.3.14 Codeiniter:2.1.3 在 root 中写入前提:rwxr-x--x
编辑2:
当我设置
$application_folder = 'home/vol8/byethost17.com/my_username/htdocs/application';
$system_path = 'home/vol8/byethost17.com/my_username/htdocs/system';
它会起作用,这意味着可能是主机不允许这样做。
编辑 3:
当我把
$system_path = dirname(__FILE__) . "/../system";
该页面不会加载,甚至不会显示错误消息。