For your code to work, two things must happen. PHP must have the OpenSSL extension enabled so that it can make a request using the ftps protocol, and the ftps wrapper must support scandir().

From the php manual it is not clear if scandir() is supported. Table O.4 does not specifically list scandir(), but it would probably fall under the stat() functions, where only the following are supported - As of PHP 5.0.0: filesize(), filetype(), file_exists(), is_file(), and is_dir() elements only. As of PHP 5.1.0: filemtime().

mlse

03-07-2008, 02:42 PM

Ok,

thanks for that! I will investigate my set-up more fully ... in the meantime I've written a hack using fopen and fclose.