Log::put PHP Method

put() static public method

文件写入
static public put ( string $filename, string $content, $type = '' ) : boolean
$filename string 文件名
$content string 文件内容
return boolean
    static function put($filename, $content, $type = '')
    {
        $dir = dirname($filename);
        if (!is_dir($dir)) {
            mkdir($dir, 0777, true);
        }
        if (false === file_put_contents($filename, $content)) {
            throw new Exception("写入失败" . ':' . $filename);
        } else {
            self::$contents[$filename] = $content;
            return true;
        }
    }