File.php
public static function write($file,$content,$recursive=false,$mode=0777)
    {
        $dir = dirname($file);

        if(!is_dir($dir))
        {
            mkdir($dir,$mode,$recursive);
        }

        return file_put_contents($file,$content);
    }
public static function write($file,$content,$recursive=false,$mode=0777)
    {
        $dir = dirname($file);

        if(!is_dir($dir))
        {
            mkdir($dir,$mode,$recursive);
        }

        return file_put_contents($file,$content);
    }
写文件