...

View Full Version : php list images in directory



basilis
12-14-2012, 11:38 PM
Hello.

I am new in programming.
I would appreciate some help.

I have a folder in my site where I save all images from snagit.
But instead of seeing file names, I would like to see the images themselves with the last ones uploaded on top.

Could you modify the file?
Thanks.


<body>

<?php
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$thelist .= '<LI>

<a href="'.$file.'">'.$file.'</a>';
}
}
closedir($handle);
}
?>

<P>List of files:</p>
<UL>
<P><?=$thelist?></p>
</UL>







</body>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum