$ _SERVER ['PATH_INFO']未出现在我的服务器apache 2.4中

时间:2018-10-24 15:17:42

标签: php .htaccess apache2.4

您对此问题有任何想法吗? 我使用的是Apache 2.4和php 7.2(在我的本地计算机上) 我使用此指令创建htaccess

    #note for apache2 must be activated becarefull on apache 2.4
    AcceptPathInfo on

现在,如果我在php文件中编写

   var_dump(print_r($_SERVER));

未显示PHP_INFO。

     Array ( 
        [REDIRECT_STATUS] => 200 
        [HTTP_HOST] => localhost 
        [HTTP_CONNECTION] => keep-alive 
        [HTTP_CACHE_CONTROL] => max-age=0 [HTTP_UPGRADE_INSECURE_REQUESTS] => 1 [HTTP_USER_AGENT] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/69.0.3497.100 Chrome/69.0.3497.100 Safari/537.36 
        [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 
[HTTP_ACCEPT_ENCODING] => gzip, deflate, br 

        [HTTP_ACCEPT_LANGUAGE] => fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7 
        [HTTP_COOKIE] => pid=vg3p1ibnh3226vgtnd1u6cvo1s [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin [SERVER_SIGNATURE] =>
        Apache/2.4.34 (Ubuntu) Server at localhost Port 80
        [SERVER_SOFTWARE] => Apache/2.4.34 (Ubuntu) 
        [SERVER_NAME] => localhost 
    [SERVER_ADDR] => ::1 
    [SERVER_PORT] => 80 

 [REMOTE_ADDR] => ::1 
    [DOCUMENT_ROOT] => /var/www 
    [REQUEST_SCHEME] => http 
        [CONTEXT_PREFIX] => 
        [CONTEXT_DOCUMENT_ROOT] => /var/www 
        [SERVER_ADMIN] => webmaster@localhost 

[SCRIPT_FILENAME] => /var/www/clicshopping_test/boutique/index.php [REMOTE_PORT] => 48174 .

        [REDIRECT_URL] => /boutique/Products/Description/products_id,2 [GATEWAY_INTERFACE] => CGI/1.1 
        [SERVER_PROTOCOL] => HTTP/1.1 
    [REQUEST_METHOD] => GET 
        [QUERY_STRING] => 
    [REQUEST_URI] => /boutique/Products/Description/products_id,2 [SCRIPT_NAME] => /clicshopping_test/boutique/index.php 
        [PHP_SELF] => /boutique/index.php 
        [REQUEST_TIME_FLOAT] => 1540393476.143 
        .[REQUEST_TIME] => 1540393476 )

如何解决这个问题?

谢谢。

0 个答案:

没有答案