public function set_host_name($hostname, $port = null)
{
$this->hostname = $hostname;
if ($port) {
$this->port = $port;
$this->hostname .= ':' . $port;
}
}
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; }