【发布时间】:2015-03-23 07:11:42
【问题描述】:
我正在尝试在我的网络托管服务器上设置两个代码点火器应用程序。 两者都使用我放置的相同系统文件夹 : /public_html 所以它是 /public_html/system :用于系统文件 和我的两个应用程序,我将它们放在一个名为应用程序的文件夹中 : /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:
$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? 或者我应该对设置过程进行哪些更改?
【问题讨论】:
-
您访问应用程序的依据是什么。将条件放在应用程序文件夹之外的 index.php 中,并相应地给出应用程序名称。所以会根据情况来申请
标签: php codeigniter codeigniter-2 cpanel