fopen and ftp

From: Date: Tue, 14 Nov 2000 20:48:19 +0000
Subject: fopen and ftp
Groups: php.general 
Request: Send a blank email to php-general+get-25234@lists.php.net to get a copy of this message
Here is the command that I am using: fopen("ftp://...@ftp.sitename.com/hold_directory/filename.txt","r") When I run it in php, I get Warning: fopen("ftp://...@ftp.sitename.com/hold_directory/filename.txt","r") - No such file or directory in /absolute/path/to/controlling/php/script.php3 on line X When I copy and past the above ftp command into my browser, (ie ftp://...@ftp.sitename.com/hold_directory/filename.txt) I get the error "the page cannot be displayed" error in IE (don't know what it would be in NS). When I remove the file name and try again, the directory's contents will get displayed. If I try the ftp command again, the file will miraculously pop up. Huh? Now, when I ftp in via the command line, I get dumped into the dir just below "hold_directory" making it so that I have to CD to "hold_directory" if I want to do anything to the files within so I don't think it is a path issue. Does anyone know what is going on? While I am on the subject, if I do eventually get this to work (hoping), is there a way to delete a file on a remote ftp server using PHP in a similar manner in which I read it (ie, the code above)? Thank you for your help! Chris

« previous php.general (#25234) next »