Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getAllImagesInDirectory($path) {
- if ($handle = opendir($path)) {
- $images = "[";
- while (false !== ($file = readdir($handle))) {
- if($file !== "." && $file !== "..") {
- $images .= "{image : '$path$file', title : '', url : ''},";
- }
- }
- closedir($handle);
- return substr($images,0,strlen($images)-1) . "]";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement