我要在1.php上怎么写才能在log.txt上$msg里输出的是person.php的结果,就是把那个('调入文件成功')改为那个person.php的结果
//1.php
>> '.$msg.\r\n;
file_put_contents($logfile,$msg,file_append );
require_once('person.php');
}
writelog('调入文件成功');
?>
//person.php
name = $name;
$this->age = $age;
}
function show() {
echo my name is .$this->name. ;
}
}
$sxd=new person();
$sxd->name=sxd;
$sxd->age=22;
$sxd->show();
echo age is .$sxd->age;
?>