PHP code example of azhida / baiduwangpan-api
1. Go to this page and download the library: Download azhida/baiduwangpan-api 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/ */
azhida / baiduwangpan-api example snippets
$config = [
'AppID' => '',
'Appkey' => '',
'Secretkey' => '',
'RedirectUri' => 'http://localhost/bd_pan/get_code',
'rtype' => 1,
'FileFragmentSize' => 4, // 分片上传的单个文件片段大小,单位 M,默认:4M
];
$bdPan = new \Azhida\BaiduwangpanApi\BdPan($config);
// 授权
$bdPan->authorize();
// 上传文件
$bdPan->upload('./111.zip', '/apps/111.zip');