zoukankan      html  css  js  c++  java
  • tp5.1 错误 No input file specified.

    http://www.xxxx.com/admin/index/index

    在登录的时候报错

    出现错误: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://www.kancloud.cn/manual/thinkphp5_1/353955
    ---------------------
    文:https://blog.csdn.net/haibo0668/article/details/80452372

  • 相关阅读:
    bootstrap-select.js 下拉框多选后动态赋值
    vs2012 未找到与约束 ContractName Microsoft.VisualStudio.Utilities.IContentTy...
    jquery 报错 Uncaught TypeError: Illegal invocation
    火狐浏览器的RestClient,接口测试,Post提交数据
    destoon二次开发 操作数据库可运行示例
    ZendStudio13 PHP调试环境快速配置
    VR发展的最大障碍在于内容?
    优秀博文链接
    LoopMatrix
    串口输出float型数据
  • 原文地址:https://www.cnblogs.com/showcase/p/11199007.html
Copyright © 2011-2022 走看看