php class MyClass{ const constant = 'constant value'; function showConstant(){ //方法中呼叫常量,沒有$ echo self::constant."<br>"; } } //類直接 ...
確定! 回上一頁