php 更新配置文件
$config_file="路径"; if(file_exists($config_file)){ $configs=include $config_file; }else { $configs=array(); } $configs=array_merge($configs,$data); $result = file_put_contents($config_file, "<?php\treturn " . var_export($configs, true) . ";");
此方法与上一篇http://www.cnblogs.com/qinmei/p/6903333.html最后的结果都一样

浙公网安备 33010602011771号