thinkPHP 出现route不起作用提示No input file specified.

修改.htaccess文件

原因在于使用的PHP是fast_cgi模式,而在某些情况下,不能正确识别path_info所造成的错误。

打开.htaccess 在RewriteRule 后面的index.php教程后面添加一个“?”

如下:

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

  

猜你喜欢

转载自www.cnblogs.com/bbird/p/12068595.html
今日推荐