美文网首页
thinkphp5 一直提示控制器不存在

thinkphp5 一直提示控制器不存在

作者: lookphp | 来源:发表于2018-07-23 18:25 被阅读15次

控制器名称及路径正确:
D:\tfcms\app\user\controller\VerificationCodeController.php
直接把控制器名称粘过来,提示控制器不错
访问失败的地址:https://dev.xxx.com/user/VerificationCode/send.html
以为是大小写的原因,修改为小写,依然提示不存在。
访问失败的地址:https://dev.xxx.com/user/verificationcode/send.html

后来查看文档,发现是控制器名称的原因,大驼峰的命名方式,需要用下划线连接。
可以成功访问的地址:https://dev.xxx.com/user/verification_code/send.html

参考文档:http://www.thinkphp.cn/topic/42713.html

相关文章

网友评论

      本文标题:thinkphp5 一直提示控制器不存在

      本文链接:https://www.haomeiwen.com/subject/hunjmftx.html