Re: Finding Out Document That Included Another File

From: Date: Thu, 12 Jul 2001 15:57:17 +0000
Subject: Re: Finding Out Document That Included Another File
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57605@lists.php.net to get a copy of this message
The way PHP works currently, $PHPSELF will point to your original file. This is actually a problem, as it means that you cannot use relative includes in the included file if its in a different directory. There's currently discussion on the PHP-DEV list about changing this. Perhaps there's going to a be a new include_local function or, ideally, I'd love it if there was an environment variable set up that pointed to the included page so the script could handle any relative includes (or HTML links, for that matter) itself. For your purposes though, $PHPSELF should work. Hope this helps. Aral :) ______________________________ (aral@kismia.com) New Media Producer, Kismia, Inc. (aral@american.edu) Adj. Prof., American University ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

« previous php.general (#57605) next »