Go to my github

常用函数

 

/**
 * 保存配置到php文件中
 * @param string $filename 文件路径
 * @param mixed $content 保存的内容
 */
function saveConfig($filename, $content) {
    file_put_contents($filename, "<?php\n\nreturn " . var_export($content, true) . ';');
}

  

posted @ 2019-03-25 17:03  峡谷少爷  阅读(106)  评论(0)    收藏  举报