A Guide to Mobile and Web Technology(LAMP)

Posts tagged ‘list all’

List all the files in a directory in php

This code will display all the files in the images folder.

foreach (glob("images/*.*") as $filename) {
       echo basename($filename);
}
Follow

Get every new post delivered to your Inbox.

Join 38 other followers