我正试图在我的web托管服务器上设置两个代码点火器应用程序。两者都使用我放置的同一系统文件夹:/public_html原样/public_html/system:用于系统文件以及我的两个应用程序,我已将它们放在一个名为"应用程序"的文件夹中:/public_html/applications所以它是/public_html/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。
以下是我分别针对这两个应用程序的urlapp_1:
$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/';
我的app_1的索引是:
$config['index_page'] = '';
app_2:
$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/';
我决定为应用程序2添加索引文件所以是
$config['index_page'] = 'index_2.php';
请有人建议我如何从url访问app_2?或者我应该对设置过程进行哪些更改?
系统和应用程序文件夹
/public_html/system->系统文件夹
/public_html/applications/app_1->application 1
/public_html/applications/app_2->application2
索引页面
/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