get_object() public method

获得Object内容
Since: 2011-11-14
Author: xiaobing.meng@alibaba-inc.com
public get_object ( $bucket, string $object, array $options = null ) : ResponseCore
$object string (Required)
$options array (Optional)
return ResponseCore
Exemplo n.º 1
0
 function ftp_get($file, $path)
 {
     $obj = new ALIOSS();
     $obj->set_host_name($this->hostname, $this->port);
     $obj->set_debug_mode(FALSE);
     $bucket = $this->bucket;
     $file = jishigou_oss::clear($file);
     $path = jishigou_oss::clear($path);
     $options = array(ALIOSS::OSS_FILE_DOWNLOAD => $path);
     $response = $obj->get_object($bucket, $file, $options);
     $rt = jishigou_oss::status($response);
     return $rt == '2' ? 1 : 0;
 }