我正在尝试在我的网络托管服务器上设置两个代码点火器应用程序。 两者都使用我放置的相同系统文件夹 : / public_html所以它是/ public_html / system:用于系统文件 我将它们放在一个名为applications的文件夹中 : / public_html / applications所以它是/ public_html / applications / app_1和/ public_html / applications / app_2
我决定使用index.php和app_2使用index_2.php为app_1创建两个应用程序的不同索引文件。
我已成功使用我的主网址成功访问app_1但我无法访问我的app_2,因为我不知道在app_2中使用什么作为我的base_url。
以下是我对这两个应用程序的相应网址 app_1:
$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';
有人可以建议我如何从网址访问app_2吗? 或者我应该在设置过程中做出哪些更改?
答案 0 :(得分:1)
系统和应用程序文件夹
/ public_html / system - >系统文件夹
/ public_html / applications / app_1 - >申请1
/ public_html / applications / app_2 - >申请2
索引页。
/public_html/index.php - >访问应用程序1
/public_html/index_2.php - >访问应用程序2
无需更新基础网址 - ($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';
网址
应用程序1:example.com/index.php
申请2:example.com/index_2.php