I need to see some sample code that will take a file from a user via the <input type=file name=userfile> html tag and use FTP to put it up on an ftp site. I have done this successfully via http - but would like to do it with ftp for control and security. I keep getting this error:
Warning: error opening /home/ftp/pub/beapnet.html in /www/htdocs/rp_bcase.php on line 15
Here is my code:
if (!(file_exists("/home/ftp/pub/$userfile_name"))): // Make sure the file doesn't already exist
$ftp = ftp_connect("204.240.168.220");
ftp_put($ftp,$userfile,"/home/ftp/pub/$userfile_name",FTP_BINARY);
else:
die ('Filename already exists, please rename the file and try again.');
endif;
endif;
any ideas guys?