Skip to main content
Nerd-streamUncategorized

Show all images in a directory using PHP

By March 1, 2013No Comments

This is a sweet script. It displays all the files in a particular directory. In this case it’s a folder full of user uploads, so it makes keeping an eye on things a breeze.

[sourcecode language=”php”]‘;
}
?>[/sourcecode]

You can of course easily modify it to show only JPGs or other image types (if you’re pulling content from a directory of mixed file types) or to edit the echo so it returns images that link to user profiles etc.

But this is it’s most basic form.

Author Peter

More posts by Peter

Leave a Reply

Exit mobile version