tp5 No input file specified.


我的是windows10 系统,phpstudy 环境 ,配置的本地虚拟机,tp5.1

访问跟目录正常

TIM截图20180417083736.png

访问次级页面报错

TIM截图20180417083753.png

对于 tp5  No input file specified.  的问题,其实是 .htaccess 文件的配置问题

源文件是这样的

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

 //只需样改成这样

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

 

修改完之后访问正常

TIM截图20180417083836.png


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM