Jump to content

[SOLVED] displaying everything in a folder


adam291086

Recommended Posts

I have a simple script to display all files within a folder. I want to remove the . and .. any clues?

if ($handle = opendir('images')) 
{


    while (false !== ($file = readdir($handle))) 
{
        ?>

	<td>
	<img src= "images/<?php echo $file ?>" width="90" height="90" id="1" onclick="parent.replace_img('images/<?php echo $file ?>')">
	</td>
	<td>

<?php
    }


    closedir($handle);
}
?>



 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/99825-solved-displaying-everything-in-a-folder/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.