我在一个类中定义了一个rand_str函数
public function rand_str($len){....}
在另一个函数中调用时 报错为:Call to undefined function rand_str()
function produce(){
....
$str = rand_str($this->strlength);
....
}还请高人指点,多谢!!!