TheBigLebowski Posted June 9, 2007 Share Posted June 9, 2007 I'm sorry if this has already been answered in another thread. I am attempting to build a PHP photo gallery without MySQL. I've got everything figured out, except how I can possibly scan certain directories to produce a list of JPEGs inside of them? The reason is that I want to allow my friend to update his photo gallery simply by dropping JPEGs into the appropriate folder, but I am not sure how, in PHP, to scan a certain directory to produce an array/list of all the images in it? Can this be done in PHP? Without MySQL? Should I be looking into Javascript instead? Thank you in advance for any suggestions. Quote Link to comment https://forums.phpfreaks.com/topic/54831-php-command-to-scan-directory/ Share on other sites More sharing options...
Caesar Posted June 9, 2007 Share Posted June 9, 2007 Don't think showing you the code would help you better understand how it works......But using glob() would make what you're asking pretty much cake. http://www.php.net/glob Quote Link to comment https://forums.phpfreaks.com/topic/54831-php-command-to-scan-directory/#findComment-271210 Share on other sites More sharing options...
s0c0 Posted June 9, 2007 Share Posted June 9, 2007 http://us.php.net/readdir if not then try google, this should be very simple to do. Quote Link to comment https://forums.phpfreaks.com/topic/54831-php-command-to-scan-directory/#findComment-271234 Share on other sites More sharing options...
TheBigLebowski Posted June 9, 2007 Author Share Posted June 9, 2007 Thanks for the info, that was exactly what I needed. cheers~ Quote Link to comment https://forums.phpfreaks.com/topic/54831-php-command-to-scan-directory/#findComment-271474 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.