This is my code to force the download:
<?php
ftp_get($conn, $local_file , $server_file, FTP_BINARY);
header('Content-Disposition: attachment; filename="' . $local_file . '"');
readfile($local_file);
ftp_close($conn);
?>
The problem is that the file is coming empty. There is something in Apache that I need to enable because the code is identical to that of the php documentation.