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

Posted by Chung Leong on 11/19/37 11:47

Alan Little wrote:
> 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.

It's not that surprising if you consider the architecture. PHP is
consisted of the PHP framework and the Zend engine. __FILE__, along
with __CLASS__, and __FUNCTION__, live in application-agnostic Zend
land. The information they hold is readily already to the language
parser. PHP_SELF on the other hand has to live in PHP-SAPI land, since
that's information from the web server. It's possible to implement what
you described, but then we would end up with cross-talk between
components that are supposed to be independent.

Again, __FILE__ is not a constant. It's a language construct. Its value
changes--unlike a constant.

 

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

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