Re: Which one to use..
| From: | Justin French | Date: | Mon, 23 Dec 2002 01:21:39 +0000 |
| Subject: | Re: Which one to use.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129130@lists.php.net to get a copy of this message | ||
I use:
if(eregi('index.php', $_SERVER['PHP_SELF']))
{
include('welcome_thing.txt');
}
although it'd be quicker without the eregi() call, as long as you knew the
full value that PHP_SELF would return.
Cheers,
Justin
on 23/12/02 11:30 AM, Peter Houchin (php@vfsa.com.au) wrote:
> Howdy,
>
> in my header page that I include I have a lil script that basically welcomes
> a user to the site.. I've been asked if I can only get this to show up on
> the 1st page of the site ( index.php ) now rather than have a whole new
> header page I want to see if i can go something like this
>
> if page = index.php
> do this
> else
> do that
>
> now to my actual question which way/function would be the better option to
> use for this..
>
> $_SERVER["REQUEST_URI"], $_SERVER["SCRIPT_NAME"] or try and do something
> with $_SERVER["PHP_INFO"], or is the one that I am missing .. ?
>
> Cheers
>
> Peter
> "the only dumb question is the one that wasn't asked"
>
>