Re: comparing $php_self with real file name
| From: | skate | Date: | Tue, 15 Apr 2003 10:37:29 +0000 |
| Subject: | Re: comparing $php_self with real file name | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143899@lists.php.net to get a copy of this message | ||
oops, sorry :( didn't realise... sorry :(
----- Original Message -----
From: "Jason Wong" <php-general@gremlins.biz>
To: <php-general@lists.php.net>
Sent: Tuesday, April 15, 2003 11:29 AM
Subject: Re: [PHP] comparing $php_self with real file name
> On Tuesday 15 April 2003 18:13, skate wrote:
>
> You have started a new thread by taking an existing posting and replying
to
> it while you changed the subject.
>
> That is bad, because it breaks threading. Whenever you reply to a message,
> your mail client generates a "References:" header that tells all
recipients
> which posting(s) your posting refers to. A mail client uses this
information
> to build a threaded view ("tree view") of the postings.
>
> With your posting style you successfully torpedoed this useful feature;
your
> posting shows up within an existing thread it has nothing to do with.
>
> Always do a fresh post when you want to start a new thread. To achieve
this,
> click on "New message" instead of "Reply" within your mail client, and
enter
> the list address as the recipient. You can save the list address in your
> address book for convenience.
>
> > okay, i've checked thru the manual and can't find what i'm looking for.
i'm
> > probably not looking hard enough or summit tho, so please excuse...
> >
> > if have this...
> >
> > <?php
> > if( basename($_SERVER['PHP_SELF']) == "style.php" )
> > {
> > Header( "Location: ../index.php" );
> > }
> > ?>
> >
> > at the top of my style sheet include to stop people accessing it
directly.
> > but i'd like to this a little more dynamically so i can include it in
every
> > include file. i want to compare the php_self with the real file name of
> > that file...
> >
> > but i can't find how to get the real file name?
>
> I'm sure $_SERVER has all you're looking for.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> All a man needs out of life is a place to sit 'n' spit in the fire.
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>