Note that you can use also:
$content = implode("",file($filename)"); but I dont know if file() works
with ftp.
You should use my first tip anyway.
--

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:

<?php // test program

$conn_id=0;
$fich = fopen("ftp://usuario:clave@servidor/afiedt.buf","r";);
while ($fich[$i]) {
echo $fich[$i];
echo "<br>";
$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

Reply via email to