RE: [PHP] doc name
| From: | Ignacio Vazquez-Abrams | Date: | Fri, 17 Nov 2000 02:02:25 +0000 |
| Subject: | RE: [PHP] doc name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-25840@lists.php.net to get a copy of this message | ||
On Fri, 17 Nov 2000, Matt Stone wrote:
> Does that return the same value as $SCRIPT_NAME?
>
> -----Original Message-----
> From: Ignacio Vazquez-Abrams [mailto:ignacio@openservices.net]
> Sent: Friday, 17 November 2000 11:46 AM
> To: Rodney Davis
> Cc: PHP LIST
> Subject: Re: [PHP] doc name
>
>
> On Thu, 16 Nov 2000, Rodney Davis wrote:
>
> > I want to write a script that gets a specific page_id from a mysql
> > database based on the url or the doc title. Is there a function
> > that returns the doc title or the url?
> >
> > thanks,
> >
> > rodney
> >
>
> Try $HTTP_SERVER_VARS["PHP_SELF"] or just $PHP_SELF.
>
No. If you have a script as http://www.example.com/example.php3 and you
call it as "http://www.exapmle.com/example.php3/something",
$SCRIPT_NAME
contains "/example.php3", but $PHP_SELF contains
"/example.php3/something".
--
Ignacio Vazquez-Abrams <ignacio@openservices.net>