您的位置:首页 > 编程语言 > PHP开发

Thinkphp3.2.3 No input file specified 的解决方法

2017-02-06 11:51 591 查看
因为在Fastcgi模式下,php不支持rewrite的目标网址的PATH_INFO的解析ThinkPHP运行在URL_MODEL=2时,会出现 No input file specified.的情况,这时可以修改网站目录的.htaccess文件:

原代码为:

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

“No input file specified.”,是没有得到有效的文件路径造成的。

修改伪静态规则,如下:

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: