Home  >  Article  >  Backend Development  >  CI怎么在子目录上可以设置默认控制器

CI怎么在子目录上可以设置默认控制器

WBOY
WBOYOriginal
2016-06-13 10:34:11718browse

CI如何在子目录下可以设置默认控制器
CI建立大型大型的应用程序,需要创建子文件夹

在application/controllers下建立文件夹app1

app1目录下有多个控制器,ca.php,cb.php

我希望定义app1下的默认控制器,如设置成ca,直接访问.../app1就可以直接访问app1/ca

可以实现吗?

------解决方案--------------------
你的这个你直接$route['app1'] = "app1/ca"; 就可以了

Statement:
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