zoukankan      html  css  js  c++  java
  • no input file specified 三种解决方法

    一.IIS Noinput file specified

    方法一:改PHP.ini中的doc_root行,打开ini文件注释掉此行,然后重启IIS
     
    方法二:
     
    请修改php.ini
     
    找到
     
    ; cgi.force_redirect = 1
     
    去掉前面分号,把后面的1改为0
     
    即
     
    cgi.force_redirect = 0

    二.apache  No input file specified

     1 apache No input filespecified,今天是我们配置apache RewriteRule时出现这种问题,解决办法很简单如下
     2  
     3 打开.htaccess 在RewriteRule 后面的index.php教程后面添加一个“?”
     4  
     5 完整代码如下
     6  
     7 .htaccess
     8  
     9 RewriteEngine on
    10  
    11 RewriteCond $1 !^(index.php|images|robots.txt)
    12  
    13 RewriteRule ^(.*)$ /index.php?/$1 [L]
    14  
    15 如果是apache服务器出问题,看看是不是的Apache 把 .php 后缀的文件解析哪里有问题了。
    16  
    17 总结
    18  
    19 Apache 将哪些后缀作为 PHP 解析。例如,让 Apache 把 .php 后缀的文件解析为PHP。可以将任何后缀的文件解析为 PHP,只要在以下语句中加入并用空格分开。这里以添加一个 .phtml 来示例。
    20  
    21 AddType application/x-httpd-php .php .phtml
    22  
    23 为了将 .phps教程作为 PHP 的源文件进行语法高亮显示,还可以加上:
    24  
    25 AddType application/x-httpd-php-source .phps
    26  
    27 用通常的过程启动 Apache(必须完全停止 Apache 再重新启动,而不是用 HUP 或者USR1 信号使 Apache 重新加载)

    三.nginx配置遭遇No inputfile specified

    虚拟机测试nginx 遭遇 Noinput file specified,多方查找终于找到解决办法
     
    1、 php.ini(/etc/php5/cgi/php.ini)的配置中这两项
     
    cgi.fix_pathinfo=1 (这个是自己添加的)
     
    doc_root=
     
    2、nginx配置文件/etc/nginx/sites-available/default中注意以下部分
     
    location ~ .php$ {
     
    fastcgi_pass 127.0.0.1:9000;
     
    fastcgi_index index.php;
     
    fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
     
    include fastcgi_params;
     
    }
     
    上面的部分路径需要根据你主机主目录的实际情况填写
     
    配置完以上部分,重启一下service nginx restart,应该没问题了
    !
    

      原文:https://blog.csdn.net/wanganji5252/article/details/81782074 

  • 相关阅读:
    LeetCode 345. Reverse Vowels of a String 题解
    LeetCode 344. Reverse String 题解
    LeetCode 27. Remove Element 题解
    LeetCode 61. Rotate List 题解
    LeetCode 19.Remove Nth Node From End of List 题解
    Android耗电量
    Android 使用adb查看和修改电池信息
    Android AOP AspectJ 插桩
    Flask相关用法
    Monkey日志信息的11种Event percentage
  • 原文地址:https://www.cnblogs.com/llkbk/p/10007217.html
Copyright © 2011-2022 走看看