RE: [PHP] Getting name of the main file from external included s
| From: | Don Read | Date: | Wed, 14 Mar 2001 05:48:06 +0000 |
| Subject: | RE: [PHP] Getting name of the main file from external included s | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-43774@lists.php.net to get a copy of this message | ||
On 12-Mar-01 Aviv Revach wrote:
> 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?
>
Err ... did you look at the output of
<?php
phpinfo();
?>
I'm sure some combination of
$SCRIPT_FILENAME, $SERVER_NAME, $PHP_SELF, or REQUEST_URI is what you
want.
--
Don Read dread@texas.net
-- If you are going to sin, sin against God, not the bureaucracy.
God will forgive you but the bureaucrats won't.