Home > php教程 > php手册 > 七牛云删除图片一直失败,求大神指点

七牛云删除图片一直失败,求大神指点

WBOY
Release: 2016-06-07 11:40:56
Original
1267 people have browsed it

错误码是:object(Qiniu_Error)#9 (4) { ["Err"]=> NULL ["Reqid"]=> string(16) "_DcAAJMoxFtGO5UT" ["Details"]=> string(0) "" ["Code"]=> int(401) }


require_once("qiniu/rs.php");
$bucket = "phpsdk";
$key1 = "file_name1";
$accessKey = '';
$secretKey = '';

Qiniu_SetKeys($accessKey, $secretKey);
$client = new Qiniu_MacHttpClient(null);

$err = Qiniu_RS_Delete($client, $bucket, $key1);
echo "====> Qiniu_RS_Delete result: \n";
if ($err !== null) {
var_dump($err);
} else {
echo "Success!";
}

我想请问一下。key1是文件名吗?是不是要写全路径?

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template