set_vhost() public method

设置vhost地址
Since: 2012-06-11
Author: xiaobing.meng@alibaba-inc.com
public set_vhost ( string $vhost ) : void
$vhost string vhost
return void
示例#1
0
 function sign_url($file, $host = '')
 {
     $obj = new ALIOSS();
     if ($host != '') {
         $obj->set_vhost($host);
     } else {
         $obj->set_host_name("oss.aliyuncs.com");
     }
     $obj->set_enable_domain_style();
     $obj->set_debug_mode(FALSE);
     $bucket = $this->bucket;
     $file = jishigou_oss::clear($file);
     $timeout = $this->stimeout;
     $response = $obj->get_sign_url($bucket, $file, $timeout);
     return $response;
 }