zoukankan      html  css  js  c++  java
  • No input file specified.问题的解决

    问题描述:apache配置网站出现问题“No input file specified.”

    解决1:

      打开.htaccess 在RewriteRule 后面的index.php教程后面添加一个“?”

      

    如果还是不行,尝试以下方法:

     解决2:

       以下文件内容清空或者全部注释

          

    原文链接:https://jingyan.baidu.com/article/f7ff0bfccce11c2e26bb1381.html(感谢分享)

    tp5.1 错误 No input file specified.

    一、方法

    与php版本有关 PHP版本5.6以上都会出现这个问题 把php版本改为5.5就OK


    二、方法

    .htaccess文件中的

    RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

    在默认情况下会导致No input file specified.

    修改成

    RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

    问题解决。

    没有配置路径

    路径 :public.htaccess.php中配置

    <IfModule mod_rewrite.c>
    Options +FollowSymlinks -Multiviews
    RewriteEngine On

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

    官方下面写法不行

    URL重写

    可以通过URL重写隐藏应用的入口文件index.php(也可以是其它的入口文件,但URL重写通常只能设置一个入口文件),下面是相关服务器的配置参考:
    [ Apache ]

    httpd.conf配置文件中加载了mod_rewrite.so模块
    AllowOverride None 将None改为 All
    把下面的内容保存为.htaccess文件放到应用入口文件的同级目录下

    <IfModule mod_rewrite.c>
    Options +FollowSymlinks -Multiviews
    RewriteEngine On

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

    <IfModule mod_rewrite.c>
    Options +FollowSymlinks -Multiviews
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
    </IfModule>

    原文链接:https://blog.csdn.net/XinShun/article/details/90241842(感谢分享)

  • 相关阅读:
    Java 项目运用个人看法(简写)
    windows 搭建Solr连接数据库
    总结2016年,计划2017
    如何解决,自己认为特别难的问题?(文摘)
    spring -quartz 定时任务多任务配置
    (转) java Timer 定时每天凌晨1点执行任务
    spring多数据源切换,写入报错的问题
    如何合理和有效的进行数据库设计
    Main方法定点执行线程任务
    莫辜负当下,莫悔恨过去,莫打扰错过的人
  • 原文地址:https://www.cnblogs.com/luqiang213917/p/11128049.html
Copyright © 2011-2022 走看看