NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_SERVER['PHP_SELF'} not working?

Daniel Convissor danielc at analysisandsolutions.com
Thu Jul 21 11:22:15 EDT 2005


On Thu, Jul 21, 2005 at 10:26:13AM -0400, Hans Zaunere wrote:
> 
> And PHP_SELF depends on the configuration of Apache, too, as it will 
> change depending on certain directives.  I'm a fan of SCRIPT_NAME...

__FILE__ is the safest, most reliable (cross-sapi) way to get this kind of 
info.  basename() and dirname() functions on that value can be very 
helpful.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list