ALIOSS::set_vhost PHP Method

set_vhost() public method

设置vhost地址
Since: 2012-06-11
public set_vhost ( string $vhost ) : void
$vhost string vhost
return void
    public function set_vhost($vhost)
    {
        $this->vhost = $vhost;
    }

Usage Example

Ejemplo n.º 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;
 }