note 127252 added to language.constants.magic
| From: | theking2 at king dot ma | Date: | Mon, 11 Jul 2022 09:14:28 +0000 |
| Subject: | note 127252 added to language.constants.magic | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-218954@lists.php.net to get a copy of this message | ||
If PHP is run inside a web server request there is an important difference between the __DIR__
constant and $_SERVER['DOCUMENT_ROOT'].
Where __DIR__ of a PHP script contained within a sub-folder will include the complete server path
$_SERVER['DOCUMENT_ROOT'] will contain a server path up to the _root_ of the application.
This can be helpful when for instance an auto-loader is defined in an include file sitting inside a
sub-folder and where the classes are located in another folder at the root of the application.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.12.131 (proxied: 83.97.81.249)
----
Manual Page -- https://php.net/manual/en/language.constants.magic.php
Edit -- https://main.php.net/note/edit/127252
Del: integrated -- https://main.php.net/note/delete/127252/integrated
Del: useless -- https://main.php.net/note/delete/127252/useless
Del: bad code -- https://main.php.net/note/delete/127252/bad+code
Del: spam -- https://main.php.net/note/delete/127252/spam
Del: non-english -- https://main.php.net/note/delete/127252/non-english
Del: in docs -- https://main.php.net/note/delete/127252/in+docs
Del: other reasons-- https://main.php.net/note/delete/127252
Reject -- https://main.php.net/note/reject/127252
Search -- https://main.php.net/manage/user-notes.php