See the official website download is more than 7.0 version, the results of the SDK documentation is 6.0, when to release 7 of the SDK documentation? In particular, the download for private resources is almost without
Reply content:
See the official website download is more than 7.0 version, the results of the SDK documentation is 6.0, when to release 7 of the SDK documentation? In particular, the download for private resources is almost without
If you have anything to offer, read more about the documentation.
PHP V7SDK Documentation
use Qiniu\Auth;$accessKey = 'Access_Key';$secretKey = 'Secret_Key';// 构建鉴权对象$auth = new Auth($accessKey, $secretKey);// 要上传的空间$bucket = 'rainwsy';// 私有空间中的外链 http://
/
$baseUrl = 'http://7xox85.com1.z0.glb.clouddn.com/resume.doc';// 对链接进行签名$signedUrl = $auth->privateDownloadUrl($baseUrl);echo $signedUrl;
public function privateDownloadUrl($baseUrl, $expires = 3600) { $deadline = time() + $expires; $pos = strpos($baseUrl, '?'); if ($pos !== false) { $baseUrl .= '&e='; } else { $baseUrl .= '?e='; } $baseUrl .= $deadline; $token = $this->sign($baseUrl); return "$baseUrl&token=$token"; }