實戰序列化和反序列化

環境搭建phpstudy 序列化代碼以下php <?php class A{ var $test = "<img src=1 οnerrοr=alert(1)>"; function __wakeup(){ echo $this->test; } } $b = new A(); $c = serialize($b); echo $c; ?> 測試效果
相關文章
相關標籤/搜索