PHP code example of lyle-lai / php-sdk

1. Go to this page and download the library: Download lyle-lai/php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lyle-lai / php-sdk example snippets


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');
...
bash
$ composer