解决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 ...
随机推荐
- iOS开发-- Xcode 6单元测试
占坑 http://m.oschina.net/blog/377800 http://www.cnblogs.com/sunshine-anycall/p/4155649.html http://ob ...
- 实现调用Android手机的拍照功能
很简单,直接上示例吧 1 xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android&q ...
- 利用media query让背景图适应不同分辨率的设备
随着上网方式的多样化,用户选择上网的工具不再仅是PC,而可以是手机,或者平板电脑.随之而来的问题是如何让网页适应不同分辨率,这给前端工程师们带来了新的挑战,其中重要的一点是如何让图片能在不同的分辨率下 ...
- StrokesPlus 谷歌搜索结果转https
StrokesPlus 谷歌搜索结果转https 亲测ie11可用 --清空剪切板 acSetClipboardText('') acSendKeys("^l") --选中地址栏 ...
- Javascript阿拉伯数字转中文
Javascript阿拉伯数字转中文 template.helper('_toChinese', function (number) { /* * 单位 */ var units = '个十百千万@# ...
- mysql命令大全用户管理相关命令
1.登陆 mysql>mysql -uJDev -p 2.用户管理 mysql>use mysql; 3.查看有哪些登陆用户 mysql> select host,user, ...
- Lucene.net(4.8.0) 学习问题记录六:Lucene 的索引系统和搜索过程分析
前言:目前自己在做使用Lucene.net和PanGu分词实现全文检索的工作,不过自己是把别人做好的项目进行迁移.因为项目整体要迁移到ASP.NET Core 2.0版本,而Lucene使用的版本是3 ...
- shell脚本的基本结构以及如何执行
1.shell脚本通常以.sh为后缀,不是说不带这个.sh脚本就不会执行,而是大家一种通用的命名规范而已 2.shell脚本中的第一行一定是:#! /bin/bash.该命令说明,该文件使用的是bas ...
- 请运行TestStaticInitializeBlock.java示例,观察输出结果,总结出“静态初始化块的执行顺序”。
答:执行顺序:静态初始化块->初始化块->构造函数 静态初始化块:在第一次加载类时执行,与对象的创建无关. 构造代码块:在调用构造方法时执行. 构造函数:在调用构造函数时执行.
- 关于JAVA项目中的常用的异常处理情况
Java异常处理的几个原则如下. 1)不要丢弃异常,捕获异常后需要进行相关处理.如果用户觉得不能很好地处理该异常,就让它继续传播,传到别的地方去处理,或者把一个低级的异常转换成应 ...