RE: [PHP] Getting name of the main file from external included sc ript..
| From: | Johnson, Kirk | Date: | Tue, 13 Mar 2001 23:53:55 +0000 |
| Subject: | RE: [PHP] Getting name of the main file from external included sc ript.. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-43736@lists.php.net to get a copy of this message | ||
Aviv, I'm not quite sure what you are asking. If you are just doing an
include() or a require() on a chunk of code, then I think the usual server
variables will give you the path of the main file, e.g. $PHP_SELF. If you
are doing a *redirect* to a *different page*, then you could look at
$HTTP_REFERER, or pass the main page name as a GET attached to the URL.
Hope this helps.
Kirk
-----Original Message-----
From: Aviv Revach [mailto:aviv_r@brillianet.com]
Sent: Monday, March 12, 2001 4:15 PM
To: php-general@lists.php.net
Subject: [PHP] Getting name of the main file from external included
script..
Hey!
I already asked this once before, but nobody seems to answer. That's why
I'm re-writing
my question.
I have a main file named: "main.php3"
It includes an external php3 script named: "ext.php3"
Inside of the 'ext.php3' script - I need to know the full path
of the file which included it (in this case -
'http://www......./dir1/dir2/main.php3').
How could I do that?
Thank you in advance -
Aviv Revach
BRILLIANeT Website -
http://www.brillianet.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net