笔记 · · 589 阅读

easywechat上传图片语音到七牛或阿里云

easywechat

自己仿写的一个方法

    /**
     * @Author    muyuan
     * @DateTime  2018-01-09
     * @copyright [返回内容结果]
     * @license   [license]
     * @version   [version]
     * @param     string      $directory [description]
     * @param     string      $filename  [description]
     * @return    [type]                 [description]
     */
    public function saveoss(string $directory, string $filename = '')
    {
        $this->getBody()->rewind();
        return $contents = $this->getBody()->getContents();
    }
主要是用来返回内容