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

猜你喜欢

转载自www.cnblogs.com/lanchar/p/8861591.html
今日推荐