> -----Original Message-----
> From: Hostmaster [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, October 26, 2001 3:23 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-INST] Problem: PHP_SELF variable
> 
> 
> does anyone know why my $PHP_SELF shows the full path
> and not only the name of the script? Something wrong
> with my php.ini?  Thanks in advance for answers.

The manual, at 

        http://www.php.net/manual/en/language.variables.predefined.php

Says that the value returned in $PHP_SELF is "relative to the document
root"...that'd imply to me that it's intended to include path
information from your server's document root on down, and I don't think
I've ever specifically seen it do otherwise.

If all you want is the actual name, without any path information at all,
perhaps the basename() function would be helpful?

---
Mark Roedel             |  "Blessed is he who has learned to laugh
Systems Programmer      |   at himself, for he shall never cease
LeTourneau University   |   to be entertained."
Longview, Texas, USA    |                           -- John Powell 

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