12-10-2007, 05:15 AM
|
#6 (permalink)
|
|
The Frequenter
Join Date: Sep 2007
Posts: 360
Thanks: 24
|
You can use a function called glob(). It uses a pattern to search for the required files. If all you have in that directory are images, you can use the following:
http://php.net/glob
php Code:
<?phpforeach (glob("*") as $szFilename) { echo '<img src="' . $szFilename . '" alt="Image" />'; }?>
Database would be overkill for a simple thing like this which can be achieved using one function unless you want to output more information regarding the file like titles, short description, tags and much more..
|
|
|
|