关于定义define()的区域

浏览:1260 发布日期:2016/11/03 分类:求助交流 关键字: define 常量
class xxx extends xxx{
define(xxx , xxx);
public static function xxx() {
}
}
为何这样在方法外定义常量会报错,
class xxx extends xxx{
public static function xxx() {
define(xxx , xxx);
}
}
在方法内就正常,
如果我想在方法外定义常量,作为全局常量,供该类的所有方法调用,应该怎么定义
最佳答案
评论( 相关
后面还有条评论,点击查看>>