//追加写入
file_put_contents(‘xml.text‘,json_encode($postObj,JSON_FORCE_OBJECT).PHP_EOL,FILE_APPEND);
php 文件追加写入
原文:https://www.cnblogs.com/huay/p/11578851.html