我正在尝试在我的虚拟主机服务器上设置两个代码触发器应用程序。这两个应用程序都使用我放置它的同一个系统文件夹: /public_html,因此它是/public_html/system :对于系统文件和我的两个应用程序,我将它们放在名为applications : /public_html/applications的文件夹中,因此它是/public_html/ applications /app_1和/public_html/applications/app_2
我决定为这两个应用程序创建不同的索引文件,其中app_1使用index.php,app_2使用index_2.php。
我已经成功地使用我的主url访问了app_1,但我根本无法访问我的app_2,因为我不知道在app_2中使用什么作为我的base_url。
以下是两个应用程序app_1的urls:
$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/';
我的app_1的索引是:
$config['index_page'] = '';
app_2:
$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/';
我决定为app 2添加我的索引文件,所以它是
$config['index_page'] = 'index_2.php';
请有人告诉我怎样才能从url访问app_2?或者,我应该在设置过程中进行哪些更改?
发布于 2015-07-09 15:13:12
系统和应用程序文件夹
/public_html/system ->system文件夹
/public_html/applications/app_1 ->应用程序1
/public_html/applications/app_2 ->应用程序2
索引页。
/public_html/index.php访问应用程序1的->
/public_html/index_2.php访问应用程序2的->
无需更新基URL - ($config['base_url'] = '';
)
在index.php、index_2.php和index_2.php中调整应用程序文件夹的路径
index.php :
$application_folder = 'applications/app_1';
index_2.php :
$application_folder = 'applications/app_2';
URL
应用1: example.com/index.php
应用2: example.com/index_2.php
https://stackoverflow.com/questions/28123587
复制相似问题