PHP Application Path Variable problem summary _php tutorial

Source: Internet
Author: User
Tags apache php

Local server, domain name http://d.com, root path D:\phpnow\vhosts\d.com.yii, relative root directory owning file/x.php code requeir_once/a/a.php, and/a/ a.php and requeir_once/a/b/b.php .

/x.php

$_server["Http_host"]: "d.com"//HOST of the current request: that is, the domain name letter information

$_server["Php_self"]: "】//
$_server["Script_name"]: "/x.php"//
$_server["Script_filename"]: "d:/phpnow/vhosts/d.com.yii/x.php"//。
__FILE__: "】//。

$_server["Request_uri"]: "/x.php/x/y/z.html?a=b&c=d"//url all content included in/and after the request.
$_server["Query_string"]: "A=b&c=d"//url the content after the request.

$_server["Document_root"]: "D:/phpnow/vhosts/d.com.yii"//Document root directory. Defined in the server configuration file

BaseName ($_server["Php_self"]): "< span="">"// < span=""> the< span="">
BaseName ($_server["Script_name"]): "x.php"// < span="">< span="">
BaseName ($_server["Script_filename"]): "x.php"// < span="">< span="">
BaseName (__file__): "< span="">"// < span="">< span="">

DirName ($_server["Php_self"]):< span="">""// < span="">< span="">
DirName ($_server["Script_name"]): "\"// < span="">< span="">
DirName ($_server["Script_filename"]): "D:/phpnow/vhosts/d.com.yii"// < span="">< span="">
DirName (__file__): "< span="">"// < span="">< span="">

require_once/a/a.php

$_server["Http_host"]: "d.com"//HOST of the current request: that is, the domain name letter information

$_server["Php_self"]: "】//
$_server["Script_name"]: "/x.php"//
$_server["Script_filename"]: "d:/phpnow/vhosts/d.com.yii/x.php"//。
__FILE__: "】//。

$_server["Request_uri"]: "/x.php/x/y/z.html?a=b&c=d"//url all content included in/and after the request.
$_server["Query_string"]: "A=b&c=d"//url the content after the request.

$_server["Document_root"]: "D:/phpnow/vhosts/d.com.yii"//Document root directory. Defined in the server configuration file

BaseName ($_server["Php_self"]): "< span="">"// < span=""> the< span="">
BaseName ($_server["Script_name"]): "x.php"// < span="">< span="">
BaseName ($_server["Script_filename"]): "x.php"// < span="">< span="">
BaseName (__file__): "< span="">"// < span="">< span="">

DirName ($_server["Php_self"]):< span="">""// < span="">< span="">
DirName ($_server["Script_name"]): "\"// < span="">< span="">
DirName ($_server["Script_filename"]): "D:/phpnow/vhosts/d.com.yii"// < span="">< span="">
DirName (__file__): "< span="">"// < span="">< span="">

require_once/a/b/b.php

$_server["Http_host"]: "d.com"//HOST of the current request: that is, the domain name letter information

$_server["Php_self"]: "】//
$_server["Script_name"]: "/x.php"//
$_server["Script_filename"]: "d:/phpnow/vhosts/d.com.yii/x.php"//。
__FILE__: "】//。

$_server["Request_uri"]: "/x.php/x/y/z.html?a=b&c=d"//url all content included in/and after the request.
$_server["Query_string"]: "A=b&c=d"//url the content after the request.

$_server["Document_root"]: "D:/phpnow/vhosts/d.com.yii"//Document root directory. Defined in the server configuration file

BaseName ($_server["Php_self"]): "< span="">"// < span=""> the< span="">
BaseName ($_server["Script_name"]): "x.php"// < span="">< span="">
BaseName ($_server["Script_filename"]): "x.php"// < span="">< span="">
BaseName (__file__): "< span="">"// < span="">< span="">

DirName ($_server["Php_self"]):< span="">""// < span="">< span="">
DirName ($_server["Script_name"]): "\"// < span="">< span="">
DirName ($_server["Script_filename"]): "D:/phpnow/vhosts/d.com.yii"// < span="">< span="">
DirName (__file__): "< span="">"// < span="">< span="">

< span="">

/a/a.php

$_server["Http_host"]: "d.com"//HOST of the current request: that is, the domain name letter information

$_server["Php_self"]: "】//
$_server["Script_name"]: "/a/a.php"//
$_server["Script_filename"]: "d:/phpnow/vhosts/d.com.yii/a/a.php"//。
__FILE__: "】//。

$_server["Request_uri"]: "/a/a.php/x/y/z.html?a=b&c=d"//url all content included in/and after the request.
$_server["Query_string"]: "A=b&c=d"//url the content after the request.

$_server["Document_root"]: "D:/phpnow/vhosts/d.com.yii"//Document root directory. Defined in the server configuration file

BaseName ($_server["Php_self"]): "< span="">"// < span=""> the< span="">
BaseName ($_server["Script_name"]): "a.php"// < span="">< span="">
BaseName ($_server["Script_filename"]): "a.php"// < span="">< span="">
BaseName (__file__): "< span="">"// < span="">< span="">

DirName ($_server["Php_self"]):< span="">""// < span="">< span="">
DirName ($_server["Script_name"]): "/A"/ < span=""> /< span="">
DirName ($_server["Script_filename"]): "d:/phpnow/vhosts/d.com.yii/a"// < span="">< span="">
DirName (__file__): "< span="">"// < span="">< span="">

require_once/a/b/b.php

$_server["Http_host"]: "d.com"//HOST of the current request: that is, the domain name letter information

$_server["Php_self"]: "】//
$_server["Script_name"]: "/a/a.php"//
$_server["Script_filename"]: "d:/phpnow/vhosts/d.com.yii/a/a.php"//。
__FILE__: "】//。

$_server["Request_uri"]: "/a/a.php/x/y/z.html?a=b&c=d"//url all content included in/and after the request.
$_server["Query_string"]: "A=b&c=d"//url the content after the request.

$_server["Document_root"]: "D:/phpnow/vhosts/d.com.yii"//Document root directory. Defined in the server configuration file

BaseName ($_server["Php_self"]): "< span="">"// < span=""> the< span="">
BaseName ($_server["Script_name"]): "a.php"// < span="">< span="">
BaseName ($_server["Script_filename"]): "a.php"// < span="">< span="">
BaseName (__file__): "< span="">"// < span="">< span="">

DirName ($_server["Php_self"]):< span="">""// < span="">< span="">
DirName ($_server["Script_name"]): "/A"/ < span=""> /< span="">
DirName ($_server["Script_filename"]): "d:/phpnow/vhosts/d.com.yii/a"// < span="">< span="">
DirName (__file__): "< span="">"// < span="">< span="">

< span="">

/x.php

  "
/x.php "' $_server[' Http_host "]:" ',[' Http_host '], ""///Current request HOST: i.e. domain name letter information ","
"'
'' $_server[' php_self "]:" ',[' Php_self '], ""//the relative address of the request execution file ","
"' $_server[' Script_name "]:" ',[' Script_name '], ""//actual execution file relative address ","
"' $_server[' Script_filename "]:" ',[' Script_filename '], ""//absolute path to the actual execution of the file. ","
"' __file__: ',, ""//The absolute path of the actual execution code. ","
"'
'' $_server[' Request_uri "]:" ',[' Request_uri '], ""//url all content included/and after the request. ","
"' $_server[' query_string "]:" ',[' Query_string '], ""//url the content after the request. ","
"'
'' $_server[' Document_root "]:" ',[' Document_root '], ""//Document root directory. In the server configuration file, define the ","
""
"' BaseName ($_server["Php_self"]): "',([' php_self ']), ""//file name of the requested executable, "
"' BaseName ($_server["Script_name"]): "',([' Script_name ']), ""//The file name of the actual executable, "
"' BaseName ($_server["Script_filename"]): "',([' Script_filename ']), ""//The file name of the actual executable, "
"' BaseName (__file__): "',(), ""///The file name of the actual execution code, "
"< span="">
";"
"' DirName ($_server["Php_self"]): "', ([' php_self ']), ""//directory where the requested execution file is located ","
" ' dirname ($_server["Script_name"]): "', ([' Script_name ' ]), ""//directory where the actual execution file is located ","
" ' dirname ($_server[" Script_filename "]):" ', ([' script_filename ']), ""//directory where the actual executable file is located, "
" ' dirname (__file__): "', ()," "//directory where the actual execution code is located", "
" "; "
" "require_once" ("a /a.php ")

/a/a.php

  "/a/a.php
   
    
   "' $_server[' Http_host "]:" ',[' Http_host '], ""///Current request HOST: i.e. domain name letter information ","
"'
'' $_server[' php_self "]:" ',[' Php_self '], ""//the relative address of the request execution file ","
"' $_server[' Script_name "]:" ',[' Script_name '], ""//actual execution file relative address ","
"' $_server[' Script_filename "]:" ',[' Script_filename '], ""//absolute path to the actual execution of the file. ","
"' __file__: ',, ""//The absolute path of the actual execution code. ","
"'
'' $_server[' Request_uri "]:" ',[' Request_uri '], ""//url all content included/and after the request. ","
"' $_server[' query_string "]:" ',[' Query_string '], ""//url the content after the request. ","
"'
'' $_server[' Document_root "]:" ',[' Document_root '], ""//Document root directory. In the server configuration file, define the ","
""
"' BaseName ($_server["Php_self"]): "',([' php_self ']), ""//file name of the requested executable, "
"' BaseName ($_server["Script_name"]): "',([' Script_name ']), ""//The file name of the actual executable, "
"' BaseName ($_server["Script_filename"]): "',([' Script_filename ']), ""//The file name of the actual executable, "
"' BaseName (__file__): "',(), ""///The file name of the actual execution code, "
"< span="">
";"
"' DirName ($_server["Php_self"]): "', ([' php_self ']), ""//directory where the requested execution file is located ","
" ' dirname ($_server["Script_name"]): "', ([' Script_name ' ]), ""//directory where the actual execution file is located ","
" ' dirname ($_server[" Script_filename "]):" ', ([' script_filename ']), ""//directory where the actual executable file is located, "
" ' dirname (__file__): "', ()," "//directory where the actual execution code is located", "
" "; "
" "require_once" ("b /b.php ")

/a/b/php

  "/a/b/b.php
   
    
   "' $_server[' Http_host "]:" ',[' Http_host '], ""///Current request HOST: i.e. domain name letter information ","
"'
'' $_server[' php_self "]:" ',[' Php_self '], ""//the relative address of the request execution file ","
"' $_server[' Script_name "]:" ',[' Script_name '], ""//actual execution file relative address ","
"' $_server[' Script_filename "]:" ',[' Script_filename '], ""//absolute path to the actual execution of the file. ","
"' __file__: ',, ""//The absolute path of the actual execution code. ","
"'
'' $_server[' Request_uri "]:" ',[' Request_uri '], ""//url all content included/and after the request. ","
"' $_server[' query_string "]:" ',[' Query_string '], ""//url the content after the request. ","
"'
'' $_server[' Document_root "]:" ',[' Document_root '], ""//Document root directory. In the server configuration file, define the ","
""
"' BaseName ($_server["Php_self"]): "',([' php_self ']), ""//file name of the requested executable, "
"' BaseName ($_server["Script_name"]): "',([' Script_name ']), ""//The file name of the actual executable, "
"' BaseName ($_server["Script_filename"]): "',([' Script_filename ']), ""//The file name of the actual executable, "
"' BaseName (__file__): "',(), ""///The file name of the actual execution code, "
" "; "
" ' dirname ($_server["Php_self"]): "', ( Span $_server< span>[' php_self ']), ""//directory where the file is requested to execute, "
" ' dirname ($_server[" Script_name "]):" ', ([' Script_name ']), ""//directory where the actual executable file is located, "
" ' dirname ($_server["Script_filename"]): "', ( [' script_filename ']), ""//directory where the actual executable file is located, "
" ' dirname (__ file__): "', ()," "//the directory where the actual execution code is located", "
" "; "
";

http://www.bkjia.com/PHPjc/440233.html www.bkjia.com true http://www.bkjia.com/PHPjc/440233.html techarticle local server, domain name http://d.com, root path D:\phpnow\vhosts\d.com.yii, relative root directory owning file/x.php code requeir_once/a/a.php, and/a/ a.php and requeir_once/a/b/b.php ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.