私はCodeigniterプロジェクトで2つのアプリケーションを持っています。構造は次のとおりです。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、私は上のtu私に与えるリンクからの指示に従っていた。私はindex.phpを/ admin/index/phpにコピーしました – bagongpct