Re: Error with ftp_get()
| From: | Thorben | Date: | Fri, 14 Nov 2003 13:18:41 +0000 |
| Subject: | Re: Error with ftp_get() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177700@lists.php.net to get a copy of this message | ||
Oh. Yes. I forget the code.
With an normal FTP-client i can get the file easily.
Ah! I've found the error.
My code was
ftp_get($conn, "tmp", $file, FTP_BINARY);
The var $file is a GET-var, but on my server register_globals is off. So i had to write $_GET['file']. It was so easy.
On Fri, 2003-11-14 at 07:33, Thorben wrote:-- RPG Genesis 2004 Mach' deine Träume wahr! Mach' dein Spiel!Warning: ftp_get(): 'RETR ' not understood. I guess 'RETR' is a message from FTPServer to PHP and PHP don't understand it. So, can you tell me, how to avoid this?When you request (get) a file using the ftp command you send a RETR command to the ftp server indicating which file you want to retrieve. I'm not 100% sure what is going on since there is no code in your post, but it looks like the RETR command is disabled on the ftp server. This means you will not be able to download files. Try retrieving the file manually using your favorite ftp client and see what happens. If you can post the code you are using we may be able to help better.