用户
 找回密码
 入住 CI 中国社区
搜索
查看: 6391|回复: 12
收起左侧

[版本 3.x] CI3.0控制器下面建文件夹 访问一直404

[复制链接]
发表于 2015-8-31 19:21:38 | 显示全部楼层 |阅读模式
CI3.0控制器下面建文件夹 访问一直404
发表于 2015-10-19 12:35:31 | 显示全部楼层
http://codeigniter.org.cn/user_guide/general/controllers.html
下面这一句实在读不懂

Each of your sub-directories may contain a default controller which will be called if the URL contains only the sub-directory. Simply put a controller in there that matches the name of your 'default_controller' as specified in your application/config/routes.php file.
发表于 2015-10-19 12:32:55 | 显示全部楼层
貌似可以在controller下建立子目录,但是不能把子目录设成默认路由
http://codeigniter.org.cn/user_guide/general/routing.html
下面有句注解:
You can NOT use a directory as a part of this setting!
发表于 2016-8-19 21:23:02 | 显示全部楼层
宠物帮帮 发表于 2016-4-19 00:05
有人解决了么?同问

默认控制器放在子文件夹下,没关系的,但是要注意控制器首字母要大写,Home.php,我的是$route['default_controller'] = 'index/home',
发表于 2015-9-1 22:56:51 | 显示全部楼层
我刚学,今天遇到和你一样的问题啊,你的解决了吗
发表于 2015-9-2 09:01:06 | 显示全部楼层
看路由文档
发表于 2015-9-7 18:34:25 | 显示全部楼层
把文件夹的首字母改成大写试试
发表于 2015-9-8 15:01:29 | 显示全部楼层
我也是这个问题,有没有大神来解决啊!!!
发表于 2015-10-18 09:33:14 | 显示全部楼层
子文件夹 无法设置成默认路由 ,怎么办
发表于 2015-10-19 22:32:37 | 显示全部楼层
我的文件夹是小写的字母,没有问题。另外会不会你设置了文件夹没有访问权限?
发表于 2016-4-19 00:05:24 | 显示全部楼层
有人解决了么?同问

本版积分规则