问题描述:使用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”的问题的更多相关文章

  1. 解决跳转出现 No input file specified.

    项目根目录中.htaccess文件修改为: <IfModule mod_rewrite.c>  Options +FollowSymlinks  RewriteEngine On Rewr ...

  2. chrome 下 input[file] 元素cursor设置pointer不生效的解决

    https://jingyan.baidu.com/article/48b558e32fabb67f38c09a81.html 环境是chrome浏览器,今天发现为html网页中的input [fil ...

  3. thinkphp 5.6以上版本出现No input file specified解决办法

    打开thinkphp,出现No input file specified. 解决方法:在工程下的.htaccess文件里, 把RewriteRule ^(.*)$ index.php/$1 [QSA, ...

  4. tp框架 php5.5以上版本出现”No input file specified“错误问题解决

    public文件夹下  .htaccess文件中的 RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] 在默认情况下会导致No input file specifie ...

  5. thinkphp5开发的网站出现”No input file specified”(php版本5.6.27)

    thinkphp5开发的网站出现”No input file specified”(php版本5.6.27) 一.总结 一句话总结:搜索引擎一定要用google,比百度节约时间一万倍,google啊, ...

  6. 完美解决 nginx No input file specified.

    一次开发中遇到了这个问题:No input file specified nginx版本1.8 找遍网络都是说 fastcgi_param SCRIPT_FILENAME $document_root ...

  7. No input file specified的解决方法apache伪静态

    http://jingyan.baidu.com/article/dca1fa6f8d623ff1a44052e8.html (一)IIS Noinput file specified 方法一:改PH ...

  8. PHP no input file specified 三种解决方法

    一.IIS Noinput file specified   (IIS上报的错误) 方法一:改PHP.ini中的doc_root行,打开ini文件注释掉此行,然后重启IIS 方法二: 请修改php.i ...

  9. 地址重写 No input file specified的解决方法

    转载自:http://blog.csdn.net/williamsblog/article/details/37532737 (一)IIS Noinput file specified 方法一:改PH ...

随机推荐

  1. JavaのEclipse安装Tomcat插件

    由于我装的eclipse是SE版,所以没有Servlet项目,需要自己安装插件. 一:首先到Tomcat的官网下载对应Tomcat版本. http://tomcat.apache.org/ 现在tom ...

  2. JQuery EasyUI DataGrid获取当前行

    1.获取当前行索引 var rowIndex = $('#dg').datagrid('getRowIndex', row); 2.根据索引删除当前行 $('#dg').datagrid('delet ...

  3. linux-Centos 7下tftp-server服务的安装与配置

    TFTP(Trivial File Transfer Protocol,简单文件传输协议)是TCP/IP协议族中的一个用来在客户机与服务器之间 进行简单文件传输的协议,提供不复杂.开销不大的文件传输服 ...

  4. Tomcat8配置用户名密码

    配置内容: 1.vim   tomcat-user.xml 添加以下内容 <role rolename="manager-gui"/> <role rolenam ...

  5. ifnull与nvl

    mysql 用 ifnull ,oracle没有ifnull 但是有相应的替换函数  nvl NVL(eExpression1, eExpression2)

  6. [No0000113]Keyboard shortcuts for Windows Visual Studio Code

    General 常用Ctrl+Shift+P, F1 Show Command Palette 显示命令行Ctrl+P Quick Open, Go to File… 快速打开Ctrl+Shift+N ...

  7. [No0000F7]C# 多态性

    多态性意味着有多重形式.在面向对象编程范式中,多态性往往表现为"一个接口,多个功能". 多态性可以是静态的或动态的.在静态多态性中,函数的响应是在编译时发生的.在动态多态性中,函数 ...

  8. 微信、QQ群短文本聊天语料总结

    在文本分类任务中,语料的特性千差万别,我们需要找到适合模型并抓住数据的特性,最终才能得到较好的model.最近在文本类别标注任务,就是给文本打标签确定该文本的类别.这是一个很费人工的过程,需要认真仔细 ...

  9. H. GSS and Simple Math Problem 高精度乘法模板

    链接:https://www.nowcoder.com/acm/contest/104/G来源:牛客网 题目描述 Given n positive integers , your task is to ...

  10. Redis的概念及与MySQL的区别

    学了MySQL相关知识后,了解到很多公司都会用mysql+redis互补使用的,今天学习整理一下Redis的相关知识. 首先是Redis和MySQL的区别: MySQL是典型的关系型数据库:Redis ...