Uploading file through FTP using PHP -


i'm curious how upload file through ftp using php. let's have upload form , user have uploaded file. how transfer file (without moving temp directory) ftp host using php?

here go:

$ftp = ftp_connect($host,$port,$timeout); ftp_login($ftp,$user,$pass);  $ret = ftp_nb_put($ftp, $dest_file, $source_file, ftp_binary, ftp_autoresume);  while (ftp_moredata == $ret)     {         // display progress bar, or someting         $ret = ftp_nb_continue($ftp);     }  // done :-) 

error handling omitted brevity.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -