<?phpclass people{ private $name; private $age; function __construct($name,$age){ $this->name=$name; $this->age=$age; }}$stu=new people('0ne','18');$ser=serialize($stu);echo $ser;?> 反序列化的时候 直接读取本地文件 而且需要有类在。