Heim >Backend-Entwicklung >PHP-Tutorial >CodeIgniter多模块配置问题

CodeIgniter多模块配置问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:09:231411Durchsuche

我想用CodeIgniter开发一个项目,前后台是相互独立的两个模块;
建了两个入口文件:home.php和admin.php,分别对应前台和后台;
application里也建了两个应用目录:admin和home
但是我在访问localhost/admin.php的时候却报404错误,不知道是什么原因,求教各位大神

回复内容:

我想用CodeIgniter开发一个项目,前后台是相互独立的两个模块;
建了两个入口文件:home.php和admin.php,分别对应前台和后台;
application里也建了两个应用目录:admin和home
但是我在访问localhost/admin.php的时候却报404错误,不知道是什么原因,求教各位大神

在admin.php修改参数
$routing['directory'] = 'admin'
在controllers里面创建一个admin文件
看一下config/routes.php
$route['default_controller'] = 'welcome';
在controllers/admin中创建一个Welcome.php
就可以了~

CodeIgniter多模块配置问题

这是我分的目录,在index.php修改system_path 和 application_folder

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn