|
Posted by Jerry Stuckle on 05/10/06 15:45
Alan Little wrote:
> I love the __FILE__ constant; it's been enormously useful. Is there a
> constant that would be the equivalent of $PHP_SELF? That's also a useful
> value, but according to the docs, "...may or may not [exist] in $_SERVER."
> In a distributed app, may or may not doesn't fly. I'm surprised, if there
> isn't a reliable way to retrieve this value.
>
Alan,
If it's supplied by the web server, it's available. But PHP cannot guarantee
what the servers give PHP.
For instance, Apache and IIS both supply it. But Acme Instant Web Server might not.
__FILE__, OTOH, is under complete control of PHP, so PHP can guarantee its
existence.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|