Skip to content
  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in
Logo1

hfpp2012 / vbot

Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • vbot
  • src
  • Support
  • FileManager.php
  • HanSon's avatar
    修复Recall bug · e8b1913e ...
    增加路径获取 System::getPath()
    以微信号为文件夹名称
    HanSon committed Jan 30, 2017
    e8b1913e Browse Files
FileManager.php 397 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?php
/**
 * Created by PhpStorm.
 * User: Hanson
 * Date: 2017/1/2
 * Time: 22:21
 */

namespace Hanson\Vbot\Support;


class FileManager
{

    public static function download($name, $data, $path = '')
    {
        $path = System::getPath() . $path;
        if(!is_dir(realpath($path))){
            mkdir($path, 0700, true);
        }

        file_put_contents("$path/$name", $data);
    }

}