get_file
get_file($server,$remote_file,$local_file,$flag_fail_exist=true,$file_attributes="128",$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$remote_file – path to the file to download from FTP$local_file – path to write the file on the local disk$flag_fail_exist – stop the operation if the local disk has such a file (true)$file_attributes – after receiving the file, set the specified attributes$transfer_attributes – transfer attributes$context – context
After testing, the function returns the result of its work to the script :
true – successfully receivedfalse – errors occurred during the receipt