问题描述:使用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. js - 移动端的超出滚动功能,附带滚动条,可解决弹层中滚动穿透问题。

    背景: 弹层里边有可滚动区域时,在移动端的坑我就不多说了. 找了很多解决滚动穿透的方案,最终都不能完美解决. 一气之下自己js撸了一个. 效果图: 原理: 1.解决滚动穿透:通过给弹层绑定touchm ...

  2. inittab 解析

    Linux完成内核(Kernel)引导后,会由init初始化进程调用/etc/inittab配置文件(ps -aux | less,init进程号为始终为1,是所有系统进程的起点,init进程也有一个 ...

  3. 【黑金原创教程】【FPGA那些事儿-驱动篇I 】实验三:按键模块② — 点击与长点击

    实验三:按键模块② - 点击与长点击 实验二我们学过按键功能模块的基础内容,其中我们知道按键功能模块有如下操作: l 电平变化检测: l 过滤抖动: l 产生有效按键. 实验三我们也会z执行同样的事情 ...

  4. JAVA学习资源整理

    构建 这里搜集了用来构建应用程序的工具. Apache Maven:Maven使用声明进行构建并进行依赖管理,偏向于使用约定而不是配置进行构建.Maven优于Apache Ant.后者采用了一种过程化 ...

  5. ABP之事件总线(5)

    前面已经对Castle Windsor的基本使用进行了学习,有了这个基础,接下来我们将把我们的事件总线再次向ABP中定义的事件总线靠近.从源码中可以知道在ABP中定义了Dictionary,存放三种类 ...

  6. IBM flex system P260

    CMM 机箱管理模块 提供如下功能: 电力控制 风扇管理 机箱和计算节点初始化 交换机管理 诊断:机箱.IO选项和计算节点 资源发现和库存管理 资源告警和监控 机箱和计算节点的电源管理 安全策略管理 ...

  7. ajax 200 4 parseerror 的错误

    这个问题也碰到几次: 最后在网上还是找到了点线索:1.一可能是data:中的json 不规范2.js语句不规范3.我碰到的是dataType: 'json',data:是数组,最后把json改为tex ...

  8. SpringMVC中@RestController的用法

    转自:https://blog.csdn.net/u010412719/article/details/69710480 Spring4之后新加入的注解,原来返回json需要@ResponseBody ...

  9. [No0000D5]便利所有子目录更改后缀名bat

    pause for /r %%i in (.) do ( cd %%i ren *.txt *.dll ) pause

  10. java 验证字符串是否包含中文字符

    中文的模式:"[\\u4e00-\\u9fa5]|\\\\u" 例子: private static final Pattern p = Pattern.compile(" ...