What is the difference between ftp_fput vs ftp_put?
ftp_fput()
expects an open resource and ftp_put()
just use a (local) filename
ftp_put($foo, $bar, $filename, $baz);
ftp_fput($foo, $bar, fopen($filename, 'r+b'), $baz);
- ftp_fput
- "Uploads from an open file to the FTP server"
- ftp_put
- "Uploads a file to the FTP server"
More specifically, ftp_fput
takes a resource created with fopen
as the file to upload where as ftp_put
takes the filename as a string.