【PHP】Thinkphp3.1.3 No input file specified

项目环境:windows10 + Apache + Thinkphp3.1.3 + PHP5.6.27 NTS

本地项目报错 No input file specified.
在这里插入图片描述
解决办法:将.htaccess文件

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

 RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

</IfModule>

修改为

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

</IfModule>

猜你喜欢

转载自blog.csdn.net/Kevin_Gates/article/details/130542292