예제 #1
0
파일: File.php 프로젝트: uwitec/outbuying
 /**
  * 下载文件(http)
  *
  * @param unknown_type $filepath
  * @return unknown
  * jute
  * 20080115
  */
 function httpdownloadfile($filepath = '')
 {
     if (Watt_Util_Net::isLANIp($_SERVER['SERVER_ADDR'])) {
         $filemanager = Watt_Config::getCfg('TQ_FTP_MANAGER');
         $ftp_upload_path = Watt_Config::getFtpDir();
     } else {
         $filemanager = Watt_Config::getCfg('FtpServerOuterManager');
         $ftp_upload_path = Watt_Config::getCfg('FtpDirOuter');
     }
     //$filemanager ="http://filemanager.transn.net/";
     $url = $filemanager . '?do=download';
     $url = $url . "&ftpRelPath=" . $ftp_upload_path . "&ftpName=" . $filepath;
     return file_get_contents($url);
 }