Home > Backend Development > PHP Tutorial > CodeIgniter多模块配置问题

CodeIgniter多模块配置问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:09:23
Original
1411 people have browsed it

我想用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

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template