Hi everyone!
I'm trying to move a wordpress page that I have tinkered with on my localhost to my home server and it is causing me some problems of course. On the index page I want to load images from folders via this php code:
$uploads = wp_upload_dir();
if ($dir = opendir($uploads['basedir'].'/gallery/menu/')) {
$images = array();
while (false !== ($file = readdir($dir))) {
if ($file != "." && $file != "..") {
$images[] = $file;
}
}
closedir($dir);
}
As I mentioned, it works on my localhost but not on the server. I get no error messages, it simply won't go through the if statement. Any suggestions would be much appreciated.
Thank you.
Fred