Hi,
You should read www.php.net/fopen :
If filename begins with "ftp://"; (not case sensitive), an ftp connection to
the specified server is opened and a pointer to the requested file is
returned. If the server does not support passive mode ftp, this will fail.
You can open files for either reading or writing via ftp (but not both
simultaneously). If the remote file already exists on the ftp server and you
attempt to open it for writing, this will fail. If you need to update
existing files over ftp, use ftp_connect().
You should also read www.php.net/feof, www.php.net/fread You can't echo the
var of fopen, you must use fread and verify you're not at the end of the
file with
while(!feof($fich))...
--
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com - Hébergement de sites Internet
"Javier Campo Martinez" <[EMAIL PROTECTED]> a écrit dans le message
de news: 012e01c253ab$1669a310$[EMAIL PROTECTED]
Hi,
I will appreciate if you have some sample code about opening a file from a
UNIX server.
This is the code I wrote for this issue:
ftp://usuario:clave@servidor/afiedt.buf","r";);
while ($fich[$i]) {
echo $fich[$i];
echo "";
$i++;
}
?>
This is the message error/warning:
Warning: File not found in d:\apache\htdocs\lee_fichero2.php3 on line 3
Warning: file("ftp://...@servidor/afiedt.buf";) - No such file or directory
in d:\apache\htdocs\lee_fichero2.php3 on line 3
In the other hand, my php version is 4.0
In the help of the command fopen(), it says:
If filename begins with "ftp://"; (not case sensitive), an ftp connection to
the specified server is opened and a pointer to the requested file is
returned. If the server does not support passive mode ftp, this will fail.
You can open files for either reading or writing via ftp (but not both
simultaneously).
phpinfo() returns me the following ftp topic:
FTP support enabled
I just don't know what more can I do ...
Thanx in advance
Javier
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php