You are here: Re: __SELF__? « PHP Programming Language « IT news, forums, messages
Re: __SELF__?

Posted by Alan Little on 11/19/36 11:47

Carved in mystic runes upon the very living rock, the last words of
Chung Leong of comp.lang.php make plain:

> Alan Little wrote:
>> Carved in mystic runes upon the very living rock, the last words of
>> Chung Leong of comp.lang.php make plain:
>>
>> > 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.
>> >
>> > PHP_SELF should always be present in a web environment.
>>
>> I agree, but it isn't always. I've run into trouble relying on it in
>> Phorm.
>
> Under what situation do you not see PHP_SELF? It's obviously possible
> that a certain version of a SAPI module is buggy. The point is it's
> supposed to be there.

Well, to be honest I never did any real troubleshooting on it, and it was
quite a while ago. I used to rely on it in Phorm, and there were 2 or 3
times users had problems because it wasn't set.

I'm just surprised that whoever thought of the __FILE__ constant didn't
think to make this one as well, both for reasons of reliability and
security.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация