if (defined('MYCONSTANT')) {    echo MYCONSTANT;} 

上述代码即判定了常量是否被定义。没被定义就用define(“MYCONSTANT”,”ABC”);定义出来~[……]

Read more