这里的代码!没有工作,请帮助。呼叫功能从对方内部不起作用
class user{
var idgen;
function uid(){
//return uniqid (rand(), true);
return "123";
}
function gen() {
$this->idgen=$this->uid();
//$this->idgen=udi();//even this dint work
}
function pint() {
echo "The id is :".$this->idgen;
}
}
$use= new user();
$use->gen();
$use->pint();
什么是错误信息? – JJJ
请发布程序的输出,如果没有做任何事情,请输出“不输出”。 – jefflunt
“不工作”不是问题描述。 –