put_file
put_file($server,$local_file,$remote_file,$flag_fail_exist="true",$transfer_attributes="2",$context="1"); - get the FTP file to the local disk
The input function accepts parameters:
$server – address of the already connected FTP connection$local_file – path to the local file that we will send to the FTP$remote_file – path to the file on the FTP where we will write$flag_fail_exist – stop the operation if the FTP already has such a file (true)$transfer_attributes – transfer attributes$context – context
After testing, the function returns the result of its work to the script :
true – successfully passedfalse – errors occurred during the transfer