5
我在Codeigniter项目中有两个应用程序。波纹管的结构如下:Can not calling in codeigniter
/admin
/index.php
/application
/admin
/controllers
/Dashboard
/Product
/Post
/public
/controllers
/Home
/About
/Contact
/system
/index.php
公共应用程序可以正常工作。我可以用此设置调用所有控制器:
/*----seting in /index.php---*/
$application_folder = 'application/public';
/*----seting in /application/public/config/config.php---*/
$config['base_url'] = 'http://localhost/myweb/';
/*----seting in /application/admin/config/routes.php---*/
$route['default_controller'] = 'Home';
但是,Admin应用程序无法正常工作。我只能调用仪表板控制器,这是我设置的默认控制器。该设置是这样的:
/*----setting in /admin/index.php---*/
$application_folder = '../application/admin';
/*----seting in /application/admin/config/config.php---*/
$config['base_url'] = 'http://localhost/myweb/admin/';
/*----seting in /application/admin/config/routes.php---*/
$route['default_controller'] = 'Dashboard';
所以,当我访问:
http://localhost/myweb/ //it will return home page
http://localhost/myweb/admin //it will return dashboard page
http://localhost/myweb/admin/product //it will return error
谁能帮助我解决这个问题呢?
可能是此链接应帮助[链接](https://philsturgeon.uk/codeigniter/ 2009/07/08/Create-an-Admin-panel-with-CodeIgniter /) –
你有拷贝索引吗? @bagongpct –
嗨ankit,我遵循你给我上面的链接的指令。我被复制index.php到/ admin/index/php – bagongpct