// ============================================== function ftp_upload ( $ftp_host ,$ftp_user ,$ftp_pass ,$file_from ,$file_to ){ $res_ftp = ftp_connect($ftp_host); if ($res_ftp === False) { return False; } $bol_flg = ftp_login($res_ftp, $ftp_user, $ftp_pass); if ($bol_flg === False) { return False; } unset($bol_flg); $bol_flg = ftp_put($res_ftp, $file_to, $file_from, FTP_BINARY); if ($bol_flg === False) { return False; } unset($bol_flg); ftp_close($res_ftp); unset($res_ftp); return True; } // ==============================================