欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

CakePHP根目录默认显示index.php。

程序员文章站 2024-01-02 23:15:40
...
新做了个项目。想默认显示login.ctp。
该如何设置。。
本人纯新手。。还望大家见谅。。

回复讨论(解决方案)

在你项目的config/routes.php中修改

Router::connect('/', array('controller' => 'indexs', 'action' => 'index'));

把controller和action换成相应的就可以了

在你项目的config/routes.php中修改

Router::connect('/', array('controller' => 'indexs', 'action' => 'index'));

把controller和action换成相应的就可以了

谢谢。。谢谢。。

在你项目的config/routes.php中修改

Router::connect('/', array('controller' => 'indexs', 'action' => 'index'));

把controller和action换成相应的就可以了

两条router。。修改哪一个。只修改下面一个好像不管用吧。。


在你项目的config/routes.php中修改

Router::connect('/', array('controller' => 'indexs', 'action' => 'index'));

把controller和action换成相应的就可以了

两条router。。修改哪一个。只修改下面一个好像不管用吧。。
修改上面那个,以base path开始的



在你项目的config/routes.php中修改

Router::connect('/', array('controller' => 'indexs', 'action' => 'index'));

把controller和action换成相应的就可以了

两条router。。修改哪一个。只修改下面一个好像不管用吧。。
修改上面那个,以base path开始的

恩。。。好吧又有问题了。。
修改了以后。cake直接访问了controller。。跳过login.ctp了。。这是为什么。。

参数我也已经传过去了。。把home改成了 login




在你项目的config/routes.php中修改

Router::connect('/', array('controller' => 'indexs', 'action' => 'index'));

把controller和action换成相应的就可以了

两条router。。修改哪一个。只修改下面一个好像不管用吧。。
修改上面那个,以base path开始的

恩。。。好吧又有问题了。。
修改了以后。cake直接访问了controller。。跳过login.ctp了。。这是为什么。。

解决了。。解决了。谢谢。

上一篇:

下一篇: