chris-ELM
6/10/2015 - 8:42 AM

Get the contents of a folder (also see .js for integration)

Get the contents of a folder (also see .js for integration)

<?php
$imagesDir = 'story_content/';
$images = glob($imagesDir . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);

echo json_encode($images);
?>