470,849 Members | 1,296 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

Downloading files with ftp_get

Hi guys! I have a problem with php function ftp_fget:
I try to get file from ftp server and save it to disk, but when i look at downloaded file it is first symbol missing there... what can it be?
code:
Expand|Select|Wrap|Line Numbers
  1. ftp_fget($conn_id, $handle, $path."/".$remote_file, FTP_BINARY, 1) 
nothing special, all variables exist the problem only in first symbol :)
Dec 20 '05 #1
2 2929
Niheel
2,449 Expert Mod 2GB
Try it without the 1 at the end.

Expand|Select|Wrap|Line Numbers
  1. ftp_fget($conn_id, $handle, $path."/".$remote_file, FTP_BINARY) 
Other than that your code looks normal. Your file is a binary file right? (archive, image, media file?).

Also check the file before you download it. Is it already corrupt?
Dec 20 '05 #2
It works! Thanks a lot!
Dec 21 '05 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Xerxes | last post: by
reply views Thread by rstuckart | last post: by
1 post views Thread by ralphNOSPAM | last post: by
3 posts views Thread by paddy_nyr | last post: by
1 post views Thread by Vic Spainhower | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.