请问在调用SDK中如何设置OSSBucket上读写权限呢?
Re请问在调用SDK中如何设置OSSBucket上读写权限呢?
SDK里面有!!没仔细看???
/** * Set bucket'ACL * @param string $bucket (Required) * @param string $acl (Required) * @param array $options (Optional) * @throws OSS_Exception * @author xiaobing.meng@alibaba-inc.com * @since 2011-11-14 * @return ResponseCore */ public function set_bucket_acl($bucket ,$acl , $options = NULL){ //options $this->validate_options($options); if(!$options){ $options = array(); } //bucket $this->is_empty($bucket,OSS_BUCKET_IS_NOT_ALLOWED_EMPTY); $options[self::OSS_BUCKET] = $bucket; $options[self::OSS_METHOD] = 'PUT'; $options[self::OSS_OBJECT] = '/'; $options[self::OSS_HEADERS] = array(self::OSS_ACL => $acl); $response = $this->auth ( $options ); return $response; }
赞0
踩0