
October 16th, 2003, 04:58 AM
|
|
BrainFreeze
|
|
Join Date: May 2000
Location: London
Posts: 318
Time spent in forums: 3 h 41 m 9 sec
Reputation Power: 9
|
|
|
FTP through PHP
Hi,
I have been connecting to a remote FTP server for some time now and recently it has stopped picking up the files that are stored there, it says I connect ok I can read the timeout for the ftp server.
However I cant list any files.
Has anyone had this problem before - using PHP through windows IIS.
code
PHP Code:
$conn_id = ftp_connect($ftp_server);
ftp_login($conn_id, $ftp_username, $ftp_password);
$dir = ftp_pwd($conn_id);
$contents = ftp_nlist($conn_id, $dir);
IF (isset($contents) && $contents != '')
{
FOREACH ($contents AS $entry)
echo ' <TR Bgcolor='.UseColor().'>
<TD><P>'.$entry.'</TD>
<TD><P>'.ftp_size($conn_id, $entry).' bytes</TD>
<TD><P><INPUT Type=Radio Name=file Value='.$entry.'></TD>
<TD><P><INPUT Type=Radio Name=filedelete Value='.$entry.'></TD>
</TR>';
}
ftp_close($conn_id);
__________________
_________________________
Triangle Solutions Ltd
http://www.triangle-solutions.com/
|