Hey!

I already tried many ways. I also tried using $PHP_SELF. It returned the
included script and not the main script (I echo'ed it to screen in order to 
be sure).
The main file(main.php3) has an inclusion similar to the next one:
   <?php
     include("http://$SERVER_NAME/scripts/ext.php3?LayoutDir=/layout/&LayoutNum=1");
   ?>

What do you offer me to do?


Thank you in advance -

   Aviv Revach

At 16:53 13/03/01 -0700, Johnson, Kirk wrote:
>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]


XOR-Coders Mega Programming Resource Site! -
         http://members.xoom.com/xorcoders/


-- 
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