Re: [PHP] ftp file exists

2002-11-08 Thread Jule Slootbeek
if there's no function to check (which i can;t find real quick) do soething like this: if (!ftp_mdtm($conn_id, $file) { echo "File doesn't exist"; } else { echo "File exist"; } On Friday, Nov 8, 2002, at 12:01 US/Eastern, Fifield, Mike wrote: How do you check if a file exists a remote ftp sit

Re: [PHP] ftp file exists

2002-11-08 Thread Marco Tabini
Try $f = fopen ('ftp://server/filename', 'r'); if $f is null, the file doesn't exist. Otherwise, it exists and you have to fclose ($f). FTP support has to be compiled into your version of PHP for this to work. Marco - php|architect -- The Monthly Magazine For PHP Professionals Com