标签:his str new ons const blog logs value private
php 如果在类中定义变量,在类的方法中调用时应该加上$this-> .
class ClassName { private $a = 333; function __construct() { $this->a = 2222; } public function bbb($value=‘‘) { echo $this->a; } } $b = new className(); echo $b->bbb();
标签:his str new ons const blog logs value private
原文地址:http://www.cnblogs.com/qiyazong/p/7576302.html