$str="<?php \r\n return ".var_export($config,true).';'; $ret = file_put_contents('./config.php', $str);