php 文件写入 $str="<?php return ".var_export($config,true).';'; $ret = file_put_contents('./config.php', $str);