no input file specified 解决方法

2018年02月23日 14:25:07 tiramisuer8023 阅读数:36607
 
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Tiramisu_5/article/details/79353311

(一)IIS Noinput file specified

方法一:改PHP.ini中的doc_root行,打开ini文件注释掉此行,然后重启IIS

方法二:

请修改php.ini

找到

; cgi.force_redirect = 1

去掉前面分号,把后面的1改为0

cgi.force_redirect = 0

(二)apacheNo input file specified

apache No input filespecified,今天是我们配置apache RewriteRule时出现这种问题,解决办法很简单如下

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

完整代码如下

.htaccess

RewriteEngine on

RewriteCond $1 !^(index.php|images|robots.txt)

RewriteRule ^(.*)$ /index.php?/$1 [L]

如果是apache服务器出问题,看看是不是的Apache 把 .php 后缀的文件解析哪里有问题了。

总结

Apache 将哪些后缀作为 PHP 解析。例如,让 Apache 把 .php 后缀的文件解析为PHP。可以将任何后缀的文件解析为 PHP,只要在以下语句中加入并用空格分开。这里以添加一个 .phtml 来示例。

AddType application/x-httpd-php .php .phtml

为了将 .phps教程作为 PHP 的源文件进行语法高亮显示,还可以加上:

AddType application/x-httpd-php-source .phps

用通常的过程启动 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,应该没问题了

(四)注意检查下网站目录是否有相关用户的写入权限

No input file specified.的更多相关文章

  1. HTML中上传与读取图片或文件(input file)----在路上(25)

    input file相关知识简例 在此介绍的input file相关知识为: 上传照片及文件,其中包括单次上传.批量上传.删除照片.增加照片.读取图片.对上传的图片或文件的判断,比如限制图片的张数.限 ...

  2. Apache服务器网站访问伪静态内页出现No input file specified.的完美解决方案

    原文地址:Apache服务器网站访问伪静态内页出现No input file specified.的完美解决方案 启用REWRITE的伪静态功能的时候,首页可以访问,而访问内页的时候,就提示:&quo ...

  3. 编译安装mmseg提示cannot find input file: src/Makefile.in错误

    今天安装中文词检索功能模块 coreseek,其中一个分词模块 mmseg ,编译安装到最后,出现annot find input file: src/Makefile.in aclocal   // ...

  4. HTML5的 input:file上传类型控制

    一.input:file属性 属性值有以下几个比较常用: accept:表示可以选择的文件MIME类型,多个MIME类型用英文逗号分开,常用的MIME类型见下表. multiple:是否可以选择多个文 ...

  5. input file控件限制上传文件类型

    网页上添加一个input file HTML控件: <input id="File1" type="file" /> 默认是这样的,所有文件类型都会 ...

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

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

  7. 在webapp上使用input:file, 指定capture属性调用默许相机,摄像,录音功能

    ## 在webapp上使用input:file, 指定capture属性调用默认相机,摄像,录音功能 在iOS6下开发webapp,使用inputz之file,很有用 <input type=& ...

  8. 移动端头像上传AJax input file

    jQuery中的Ajax不能支持 input file 需要用ajaxupload.js但是先需要引入jQuery文件 <script src="__PUBLIC__/js/ajaxf ...

  9. HTML input="file" 浏览时只显示指定文件类型 xls、xlsx、csv

    html input="file" 浏览时只显示指定文件类型 xls.xlsx.csv <input id="fileSelect" type=" ...

  10. input[file]标签的accept=”image/*”属性响应很慢的解决办法

    转自:http://blog.csdn.net/lx583274568/article/details/52983693 input[file]标签的accept属性可用于指定上传文件的 MIME类型 ...

随机推荐

  1. python实现http get请求

    接口请求方式为get请求,如下图抓包查看 Python实现脚本请求接口并以中文打印接口返回的数据 import urllib.parse import urllib.request url = &qu ...

  2. android中include

    android中include. include标签用法. 1.新建一个xml文件,命名 head.xml head.xml文件内容如下: <?xml version="1.0&quo ...

  3. 2010-10-08在浏览器中兼容+jQuery3

    一.实现背景图片铺满(兼容各种浏览器) <script type="text/javascript"> $(document).ready(function() { $ ...

  4. learning gcc args

    参数详解无选项编译链接    将test.c预处理.汇编.编译并链接形成可执行文件.这里未指定输出文件,默认输出为a.out.    例子用法:    gcc test.c 无选项链接    gcc ...

  5. 微服务-注册与发现-zookeeper bydasn

    目录 一.微服务注册的概述 二.zookeeper2.1 zookeeper安装启动2.2 zookeeper集群搭建2.3 zkcli操作 一.微服务注册概述 在微服务中,有这么一个东西叫服务注册表 ...

  6. Mysql怎么判断繁忙 checkpoint机制 innodb的主要参数

    Mysql怎么判断繁忙,innodb的主要参数,checkpoint机制,show engine innodb status   2018年07月13日 15:45:36 anzhen0429 阅读数 ...

  7. Json转换工具

    import java.util.List; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterx ...

  8. letCode-2

    letCode第二题题目如下: 给出两个 非空 的链表用来表示两个非负的整数.其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字. 如果,我们将这两个数相加起来,则 ...

  9. latex中使用listings显示代码

    \documentclass[12pt,a4paper]{article}\usepackage{ctex}\usepackage{listings}\usepackage{xcolor}\begin ...

  10. Python 进程池的同步方法和异步方法

    import time from multiprocessing import Process,Pool def f1(n): time.sleep(0.5) # print(n) return n* ...