请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

配置路由并使用后报错模块hello不存在

https://img1.sycdn.imooc.com//szimg/5a1618c40001991f03610264.jpg

https://img1.sycdn.imooc.com//szimg/5a1618c40001ac3c03920710.jpg

https://img1.sycdn.imooc.com//szimg/5a1618c40001d02c04280451.jpg

https://img1.sycdn.imooc.com//szimg/5a1618c5000197f803770550.jpg

https://img1.sycdn.imooc.com//szimg/5a1618c50001f72c04620518.jpg

https://img1.sycdn.imooc.com//szimg/5a1593c2000158ff06950250.jpg

https://img1.sycdn.imooc.com//szimg/5a1593c20001caab07080293.jpg

https://img1.sycdn.imooc.com//szimg/5a1593c20001903112020718.jpghttps://img1.sycdn.imooc.com//szimg/5a16166e000171a314480868.jpg

我开启了application/config.php中的路由,然后按照老师的步骤就会出现报错,但是可以继续用原来的路由访问

正在回答

2回答

这是PATHINFO模式问题, 原因 在你的nginx或apache的配置, 你把这2个的配置截图来看再分析问题。

0 回复 有任何疑惑可以回复我~
  • 提问者 TTFreeCoder #1
    是把Apache(httpd.conf)里面的内容截图么?我没有nginx,用的是Xampp装的
    回复 有任何疑惑可以回复我~ 2017-11-23 08:22:42
  • runzx 回复 提问者 TTFreeCoder #2
    你查看public/下有无一个.htaccess文件,如有,内容是什么?
    回复 有任何疑惑可以回复我~ 2017-11-23 08:25:11
  • 提问者 TTFreeCoder 回复 runzx #3
    有,内容:
    <IfModule mod_rewrite.c>
      Options +FollowSymlinks -Multiviews
      RewriteEngine On
    
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
    </IfModule>
    回复 有任何疑惑可以回复我~ 2017-11-23 08:28:36
7七月 2017-11-23 01:26:54

你试试加index.php行不行

0 回复 有任何疑惑可以回复我~
  • 提问者 TTFreeCoder #1
    您指的是加在哪里?我加在sample前面—>index.php/sample/Test/hello还是报错没有模块
    回复 有任何疑惑可以回复我~ 2017-11-23 06:58:18
  • 提问者 TTFreeCoder #2
    我加在z.cn/后面编程z.cn/index.php/hello也没用,报错没有模块hello
    回复 有任何疑惑可以回复我~ 2017-11-23 07:34:53
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信