Magic constants
时间:2010-05-02 来源:octans
参考:Magic constants http://php.net/manual/en/language.constants.predefined.php
__LINE__ The current line number of the file
__FILE__ The full path and filename of the file. If used inside an include, the name of the included file is returned.
__DIR__ The directory of the file. If used inside an include, the directory of the included file is returned.
__FUNCTION__ The function name.(Added in PHP 4.3.0)
__CLASS__ The class name(Added in PHP 4.3.0)
__METHOD__ The class method name. (Added in PHP 5.0.0)
__NAMESPACE__ The name of the current namespace (case-sensitive). This constant is defined in compile-time (Added in PHP 5.3.0)
__LINE__ The current line number of the file
__FILE__ The full path and filename of the file. If used inside an include, the name of the included file is returned.
__DIR__ The directory of the file. If used inside an include, the directory of the included file is returned.
__FUNCTION__ The function name.(Added in PHP 4.3.0)
__CLASS__ The class name(Added in PHP 4.3.0)
__METHOD__ The class method name. (Added in PHP 5.0.0)
__NAMESPACE__ The name of the current namespace (case-sensitive). This constant is defined in compile-time (Added in PHP 5.3.0)
相关阅读 更多 +