zoukankan      html  css  js  c++  java
  • TP5 框架 出现No input file specified.错误

    1.当你访问本地网页的时候,此时页面只会显示No input file specified.

    首先考虑phpstudy版本是否有问题!!!如果不是再进行以下步骤。。。。。。

    2.当网上查询的时候,上面会告诉你改  php.ini 文件

    在php.ini文件里面修改:
     
    1、增加一行(这个最重要)
     
    fastcgi.impersonate = 1
     
    2、修改两项(解开注释就可以了)
     
    cgi.fix_pathinfo=1
    cgi.force_redirect = 0
     
     
    3.因为我用的是phpstudy做的本地测试,所以在我这里并不顶用,于是我更改了   .htaccess   文件中的这句话 
       RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
    将它改为     RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]   然后再清除历史访问记录 ,就可以正常访问了
     
    如果在线上的话 RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]   还是这句话,无需修改
    如果是Nginx环境的话,可以在Nginx.conf中添加:
      location / { // …..省略部分代码
        if (!-e $request_filename) {
          rewrite ^(.*)$ /index.php?s=/$1 last;
          break;
        }
      }
     
     
     
    1. location / { // …..省略部分代码
    2.  
      if (!-e $request_filename) {
    3.  
      rewrite ^(.*)$ /index.php?s=/$1 last;
    4.  
      break;
    5.  
      }
    6.  
      }
  • 相关阅读:
    Delphi程序结构
    SQL存储过程解密 Encrypted object is not transferable, and script can not be generated

    在河南呢
    还在河南,写随笔吧
    HAVING
    mIRC
    关于CAP理论
    开篇
    移动信息系统
  • 原文地址:https://www.cnblogs.com/dennyxiao/p/9323312.html
Copyright © 2011-2022 走看看