|
|
3 년 전 | |
|---|---|---|
| .. | ||
| docs | 3 년 전 | |
| examples | 3 년 전 | |
| src | 3 년 전 | |
| tests | 3 년 전 | |
| .gitignore | 3 년 전 | |
| .scrutinizer.yml | 3 년 전 | |
| .travis.yml | 3 년 전 | |
| CHANGELOG.md | 3 년 전 | |
| CONTRIBUTING.md | 3 년 전 | |
| LICENSE | 3 년 전 | |
| README.md | 3 년 전 | |
| autoload.php | 3 년 전 | |
| composer.json | 3 년 전 | |
| phpunit.xml.dist | 3 년 전 | |
| test-env.sh | 3 년 전 | |
通过composer,这是推荐的方式,可以使用composer.json 声明依赖,或者运行下面的命令。SDK 包已经放到这里 qiniu/php-sdk 。
$ composer require qiniu/php-sdk
| Qiniu SDK版本 | PHP 版本 |
|---|---|
| 7.x | cURL extension, 5.3 - 5.6,7.0 |
| 6.x | cURL extension, 5.2 - 5.6 |
use Qiniu\Storage\UploadManager;
use Qiniu\Auth;
...
$upManager = new UploadManager();
$auth = new Auth($accessKey, $secretKey);
$token = $auth->uploadToken($bucketName);
list($ret, $error) = $upManager->put($token, 'formput', 'hello world');
...
$ ./vendor/bin/phpunit tests/Qiniu/Tests/
详情参考代码提交指南。
The MIT License (MIT).详情见 License文件.