note 61560 deleted from reserved.variables by mazzanet
| From: | mazzanet@php.net | Date: | Tue, 07 Feb 2006 09:58:49 +0000 |
| Subject: | note 61560 deleted from reserved.variables by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-103168@lists.php.net to get a copy of this message | ||
Note Submitter: camden dot michael at gmail dot com
----
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");