Caught exception: Serialization of ‘SimpleXMLElement’ is not allowed

ホームページ制作

phpプログラムを作成中にエラーが発生した。

Caught exception: Serialization of 'SimpleXMLElement' is not allowed

$img_url=$PictureURL;

$img_url=(string)$PictureURL;

に修正した。

オブジェクトのためキャストをしてあげればString型として使用することが出来るみたいです。

Translate »