__LINE__ // 显示文件中的当前行号

__FILE__ // 代码在被包含文件中,显示的是包含文件名的绝对路径

__DIR__ // 代码在被包含文件中,显示的是此文件的绝对目录

这两个比较有意思
__FUNCTION__
__METHOD__

如果再加两个
__CLASS__
__NAMESPACE__
method和class在我意料之外。

这些东西没什么大用,但就像一个个螺丝钉一样,一颗一颗把它拧紧。在测试,或者用到图片文件地址时,不失为实用工具。
网友评论