I'm trying to manage away of knowing witch images are inside the predefined p开发者_如何学Pythonics folder on my domains.
I'm trying with opendir, but it always fails, even if I'm sure my folder is there, so I guess the problem is the crossdomain thing.
Having ftp credentials, is there a way of let php know that I can indeed read the content of my folders?
You must the ftp_
series of functions to achieve what you're describing.
For example:
$ftp = ftp_connect($server);
ftp_login($ftp, $username, $password);
ftp_chdir($ftp, $images_dir);
$files = ftp_nlist($ftp); // Array of files in the images folder
精彩评论