Kirin c2e0541d56 tijiao | 2 jaren geleden | |
---|---|---|
.. | ||
docs | 2 jaren geleden | |
examples | 2 jaren geleden | |
src | 2 jaren geleden | |
tests | 2 jaren geleden | |
.gitignore | 2 jaren geleden | |
.scrutinizer.yml | 2 jaren geleden | |
.travis.yml | 2 jaren geleden | |
CHANGELOG.md | 2 jaren geleden | |
CONTRIBUTING.md | 2 jaren geleden | |
LICENSE | 2 jaren geleden | |
README.md | 2 jaren geleden | |
autoload.php | 2 jaren geleden | |
composer.json | 2 jaren geleden | |
phpunit.xml.dist | 2 jaren geleden | |
test-env.sh | 2 jaren geleden |
通过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文件.