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