解决PHP5.6版本“No input file specified”的问题
问题描述:使用TP框架做项目时,在启用REWRITE的伪静态功能的时候,首页可以访问,但是访问其它页面的时候,就提示:“No input file specified.”
原因在于使用的PHP5.6是fast_cgi模式,而在某些情况下,不能正确识别path_info所造成的错误
默认的.htaccess里面的规则:
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$ [QSA,PT,L]
</IfModule>
“No input file specified.”,是没有得到有效的文件路径造成的。
修改后的伪静态规则,如下:
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$ [QSA,PT,L]
</IfModule>
仅仅就是在正则结果“/$1”前面多加了一个“?”号,问题也就随之解决了。
解决PHP5.6版本“No input file specified”的问题的更多相关文章
- 解决跳转出现 No input file specified.
项目根目录中.htaccess文件修改为: <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On Rewr ...
- chrome 下 input[file] 元素cursor设置pointer不生效的解决
https://jingyan.baidu.com/article/48b558e32fabb67f38c09a81.html 环境是chrome浏览器,今天发现为html网页中的input [fil ...
- thinkphp 5.6以上版本出现No input file specified解决办法
打开thinkphp,出现No input file specified. 解决方法:在工程下的.htaccess文件里, 把RewriteRule ^(.*)$ index.php/$1 [QSA, ...
- tp框架 php5.5以上版本出现”No input file specified“错误问题解决
public文件夹下 .htaccess文件中的 RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] 在默认情况下会导致No input file specifie ...
- thinkphp5开发的网站出现”No input file specified”(php版本5.6.27)
thinkphp5开发的网站出现”No input file specified”(php版本5.6.27) 一.总结 一句话总结:搜索引擎一定要用google,比百度节约时间一万倍,google啊, ...
- 完美解决 nginx No input file specified.
一次开发中遇到了这个问题:No input file specified nginx版本1.8 找遍网络都是说 fastcgi_param SCRIPT_FILENAME $document_root ...
- No input file specified的解决方法apache伪静态
http://jingyan.baidu.com/article/dca1fa6f8d623ff1a44052e8.html (一)IIS Noinput file specified 方法一:改PH ...
- PHP no input file specified 三种解决方法
一.IIS Noinput file specified (IIS上报的错误) 方法一:改PHP.ini中的doc_root行,打开ini文件注释掉此行,然后重启IIS 方法二: 请修改php.i ...
- 地址重写 No input file specified的解决方法
转载自:http://blog.csdn.net/williamsblog/article/details/37532737 (一)IIS Noinput file specified 方法一:改PH ...
随机推荐
- php的opcache缓存扩展
opcache (全程 zend opcache): 从php5.5开始,默认提供的php脚本缓存扩展,编译php5.5时加上参数--enable-opcache就可以编译opcache了,只是要启用 ...
- VS2017 配置ImageMagick
以下配置仅供参考,我配置完了怎样都用不了... 直接下载源码使用VS进行编译. 源码下载地址:http://imagemagick.org/script/install-source.php#wind ...
- Android开发训练之第五章第七节——Transmitting Network Data Using Volley
Transmitting Network Data Using Volley GET STARTED DEPENDENCIES AND PREREQUISITES Android 1.6 (API L ...
- echarts - 使用echarts过程中遇到的问题(pending...)
1. 配合tab切换时,被display:none的元素init设置echarts失败 2018-11-09 18:09:35 现象描述:有一个tabs选项卡,每个切换项A.B中都有使用echart ...
- Managing Hierarchical Data in MySQL(邻接表模型)[转载]
原文在:http://dev.mysql.com/tech-resources/articles/hierarchical-data.html 来源: http://www.cnblogs.com/p ...
- jmeter 中 Client implementation HttpClient4和java区别实践一
好吧,最近还是在折腾Jmeter,在一个post请求中,发现啃爹的竟然带有特殊字符:' 怎么办,直接将数据写入,如下: 然后在实际用post发请求时,jmeter自动给转义了,如下: xxxx=%27 ...
- 阿里云服务器tomcat ./shutdown.sh关闭命令报错Could not contact localhost:8005. Tomcat may not be running.
JDK1.8运行./shutdown 停止tomcat报错: 昨天购买了一个阿里云服务器,由于时间问题今天才来启动tomcat,启动的时候才发现跟我以前使用的服务器不太一样,去网上搜索了半天以为是to ...
- golang - channels
如果说goroutine是Go语音程序的并发体的话,那么channels它们之间的通信机制.一个channels是一个通信机制,它可以让一个goroutine通过它给另一个goroutine发送值信息 ...
- Ubuntu将网卡名称eno160改为eth0并且设置静态IP
修改配置文件/etc/default/grub GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" 设置生效 update-grub ...
- [No0000D6]端口-进程查询.bat
@echo off color a Title XP端口-进程查询 setlocal enabledelayedexpansion echo ╔- -╗ echo 本机开放的端口及使用该端口的进程 e ...