Re: FTP problems continued
From: Janwillem Borleffs (jw_at_jwscripts.com)
Date: 11/11/03
- Next message: Noone: "Re: Capitalise words?"
- Previous message: Michael Wilcox: "Re: No Error Messages"
- In reply to: Irvin Amoraal: "FTP problems continued"
- Next in thread: Irvin Amoraal: "Re: FTP problems continued"
- Reply: Irvin Amoraal: "Re: FTP problems continued"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 11 Nov 2003 00:14:45 +0100
"Irvin Amoraal" <irvin@rcabletv.on.com> schreef in bericht
news:vqvf23qf1ca3df@corp.supernews.com...
>
> Below is the code for the whole page: When try to execute it, I get no
> error msgs from the fputs commands, but [code] if
The fputs function only return false when there is something terribly wrong
(e.g., connection to the server is lost).
When you want to know if the command was executed successful, you should
look at the response, e.g.:
fputs($fp, "cwd somedir");
if (!ereg("^250", fgets($fp, 1024))) echo "CWD failed";
Tip: telnet to your server through port 21, type in some commands and look
at the responses.
>
> I guess I'm all over the place in my comments here ... and I hate to ask
> this question, but why doesn't this work?
>
For starters, you are sending the cwd command before you have authenicated
yourself.
Look here for a working version:
http://www.jwscripts.com/playground/ftp3.php
JW
- Next message: Noone: "Re: Capitalise words?"
- Previous message: Michael Wilcox: "Re: No Error Messages"
- In reply to: Irvin Amoraal: "FTP problems continued"
- Next in thread: Irvin Amoraal: "Re: FTP problems continued"
- Reply: Irvin Amoraal: "Re: FTP problems continued"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|