/** * 设置bucket的acl配置 * * @param OssClient $ossClient OssClient实例 * @param string $bucket 存储空间名称 * @return null */ function putBucketAcl($ossClient, $bucket) { $acl = OssClient::OSS_ACL_TYPE_PRIVATE; try { $ossClient->putBucketAcl($bucket, $acl); } catch (OssException $e) { printf(__FUNCTION__ . ": FAILED\n"); printf($e->getMessage() . "\n"); return; } print __FUNCTION__ . ": OK" . "\n"; }