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:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 4:15 PM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to