Skip to content

Instantly share code, notes, and snippets.

@jaredwilli
Created June 3, 2011 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredwilli/1005782 to your computer and use it in GitHub Desktop.
Save jaredwilli/1005782 to your computer and use it in GitHub Desktop.
get images from folder
<?php
$size = $_POST['size'] ? $_POST['size'] : 'm';
$dir = @dir( $_POST['dir'] . $size ) ? @dir( $_POST['dir'] . $size ) : @dir( 'images' . $size );
while(( $file = $dir->read() ) !== false ) {
return $file;
}
$dir->close();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment