Hi there.
PHP is telling me there is no such file or directory at the specified location. This is rubbish.
Error message:Code:<?php function insertGalleryImages($path){ // echo getcwd(); $index = array(); if($folder = opendir($path)){ $pic_types = array("jpg", "jpeg", "gif", "png"); while($file = readdir($folder)){ if(in_array(substr(strtolower($file), strrpos($file,".") + 1),$pic_types)){ array_push($index,$file); } } closedir($folder); } return $index; } ?>
Warning: opendir(images/projects/Illustration/Animals/thumb): failed to open dir: No such file or directory in /Users/Alex/Sites/RosalindMundie/insert_gallery.php on line 5.
- I have checked current directory with getcwd()
- I have checked permissions, all have full permissions
- I have checked pwd in terminal and the directory is the same
- I have tried prepending the path name with './' and even '../' incase it is looking in the wrong place
Not sure what else to do! Anyone help?
Thanks


Reply With Quote

Bookmarks