這裏的代碼!沒有工作,請幫助。呼叫功能從對方內部不起作用
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
「不工作」不是問題描述。 –