张保健 97d25c38f3 首次提交 | 4 years ago | |
---|---|---|
.. | ||
docs/rtc | 4 years ago | |
examples | 4 years ago | |
src/Qiniu | 4 years ago | |
tests | 4 years ago | |
.gitignore | 4 years ago | |
.scrutinizer.yml | 4 years ago | |
.travis.yml | 4 years ago | |
CHANGELOG.md | 4 years ago | |
CONTRIBUTING.md | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
autoload.php | 4 years ago | |
composer.json | 4 years ago | |
phpunit.xml.dist | 4 years ago | |
test-env.sh | 4 years ago |
qiniu/php-sdk
。
bash
$ 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文件.