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]
  • 相关阅读:
    sprintf的用法
    sscanf
    Decode the tape
    poj 1579 Function Run Fun
    Where's Waldorf?
    uva Andy's First Dictionary
    UVA Hangman Judge
    UVa Automatic Editing
    界面设计规范
    web标准下的web开发流程思考
  • 原文地址:https://www.cnblogs.com/hereim/p/5694082.html
Copyright © 2011-2022 走看看