Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $types = array( 'png', 'jpg', 'jpeg', 'gif' );
- if ( $handle = opendir('pasta_desejada') )
- {
- while ( $entry = readdir( $handle ) )
- {
- $ext = strtolower( pathinfo( $entry, PATHINFO_EXTENSION) );
- if( in_array( $ext, $types ) ) {
- echo '<img src="pasta-relativa-por-http/', $entry,'">';
- }
- }
- closedir($handle);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement