PHPackages                             pfinal/storage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. pfinal/storage

ActiveLibrary[File &amp; Storage](/categories/file-storage)

pfinal/storage
==============

storage

v1.2.10(4y ago)141572MITPHPPHP &gt;=5.3

Since Feb 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pfinal/storage)[ Packagist](https://packagist.org/packages/pfinal/storage)[ Docs](http://www.pfinal.cn)[ RSS](/packages/pfinal-storage/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)DependenciesVersions (17)Used By (0)

文件存储

> 安装

```
composer require pfinal/storage

```

- 本地存储 Local
- 阿里云 AliOss

    请先 composer require aliyuncs/oss-sdk-php
- 7牛存诸 Qiniu

    请先 composer require qiniu/php-sdk:7.1.\*
- Ftp

    请先 composer require league/flysystem

> 提供接口

```
//上传文件
public function put($key, $data);
//获取url
public function url($key, $rule = null);
//重命名
public function rename($key, $newKey);
//删除
public function delete($key);
//获取错误消息
public function error();

```

> 使用示例

```
