您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

cakephp默认url指向有关问题

2024/6/15 17:55:02发布23次查看
cakephp默认url指向问题
阅读时注意index有s和没s
cakephp默认访问localhost时不是指向localhost/index吗
现在我没建index、所以这个路径显示not found
error: the requested address '/' was not found on this server.
我建个indexs_controller.php
但是cakephp默认controller是复数的、、
所以只有访问localhost/indexs时页面才是正确的、、
但是默认cakephp路由指向的是localhost/index
如何更改默认指向到localhost/indexs
------解决方案--------------------
你在config/routes.php文件设置一下,文件跳转路由,router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));设置里面的controller与action应该就可以了!
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product