note 61560 added to reserved.variables
| From: | camden dot michael at gmail dot com | Date: | Mon, 06 Feb 2006 23:16:42 +0000 |
| Subject: | note 61560 added to reserved.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-103145@lists.php.net to get a copy of this message | ||
if your file was located in;
http://www.yourserver.com/phpFiles/index.php
$server = "http://" . $_SERVER['SERVER_NAME'];
$pathToInclude = $server . $_SERVER[REQUEST_URI];
$parsePath = explode(basename($PHP_SELF), $pathToInclude);
$pathToInclude = $parsePath[0];
would return,
http://www.yourserver.com/phpFiles/
Just a dynamic way to help with includes,
include($pathToInclude . "directory/file.ext");
----
Server IP: 64.71.164.2
Probable Submitter: 71.227.161.57
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61560
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61560&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61560&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61560&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61560&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61560&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61560&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61560&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61560&report=yes
Search -- http://master.php.net/manage/user-notes.php