zoukankan      html  css  js  c++  java
  • thinkphp报错No input file specified. (对于隐藏url中的index.php 是如何做到的?)

    thinkphp5

    1.去除httpd.conf文件中"#LoadModule rewrite_module modules/mod_rewrite.so"前面的"#"号;

    2.修改httpd.conf文件中的AllowOverride None为AllowOverride All,目的是支持.htaccess文件;

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    3.重启apache sudo apachectl restart

    4.修改public目录下的.htaccess文件(有的apache服务器需要这一步)

    RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
    改为
    RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]

    最后.htaccess文件内容为: 

        RewriteEngine on 
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f 
        RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
  • 相关阅读:
    图像修补
    图像的矩
    使用多边形将轮廓包围
    寻找物体的凸包
    查找并绘制轮廓
    重映射
    霍夫变换
    边缘检测
    第二周神经网络基础
    第一周:深度学习引言(Introduction to Deep Learning)
  • 原文地址:https://www.cnblogs.com/hereim/p/5694082.html
Copyright © 2011-2022 走看看