set_host_name() публичный Метод

设置host地址
С версии: 2012-06-11
Автор: xiaobing.meng@alibaba-inc.com
public set_host_name ( string $hostname, integer $port = null ) : void
$hostname string host name
$port integer int
Результат void
Пример #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;
 }