November 19th, 2001, 11:05 AM
accesing a file using ftp
I want to be able to open a file for reading via ftp and I am using the command...
But it fails with the message - No such file or directory in /home/web6508/intranet.... on line 28.
$file_lines = file("ftp://username:passwd@intranet/R1234.txt", "r");
If I copy the command 'ftp://username:passwd@intranet/R1234.txt' into internet explorer it opens the file so I know the location of the file is correct. Also I have tried it on two different ftp clients - latest version of wu-ftpd and slightly older solaris version. I know that the manuals says that it only works with passive ftp but shouldn't wu-ftpd should be OK? (it even says 'entering passive mode when you log in!) Is there something that I need to enable in php (allow_url_fopen is On in php.ini) or is there any further info I might be able to get to find out why its failing? I am using php4.0.4pl1-3.