Note that on real paths, aliases are not resolved
$_SERVER["DOCUMENT_ROOT"] => /var/services/web/mysite
$_SERVER["SCRIPT_FILENAME"] => /var/services/web/mysite/admin/products.php
(but __FILE__ => /volume1/web/mysite/admin/inc/includeFile.inc.php)
Use realpath to resolve the $_SERVER value.
Virtual paths also have some differences:
$_SERVER["SCRIPT_NAME"] => /admin/products.php (virtual path)
$_SERVER["PHP_SELF"] => /admin/products.php/someExtraStuff (virtual path)
SCRIPT_NAME is defined in the CGI 1.1 specification, PHP_SELF is created by PHP itself. See http://php.about.com/od/learnphp/qt/_SERVER_PHP.htm for tests.
----
Server IP: 69.147.83.197
Probable Submitter: 195.137.106.159
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.server.php
Edit -- https://master.php.net/note/edit/102734
Del: integrated -- https://master.php.net/note/delete/102734/integrated
Del: useless -- https://master.php.net/note/delete/102734/useless
Del: bad code -- https://master.php.net/note/delete/102734/bad+code
Del: spam -- https://master.php.net/note/delete/102734/spam
Del: non-english -- https://master.php.net/note/delete/102734/non-english
Del: in docs -- https://master.php.net/note/delete/102734/in+docs
Del: other reasons-- https://master.php.net/note/delete/102734
Reject -- https://master.php.net/note/reject/102734
Search -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.