Skip to content

Instantly share code, notes, and snippets.

@manigandanta
Created April 11, 2012 05:59
Show Gist options
  • Save manigandanta/2357282 to your computer and use it in GitHub Desktop.
Save manigandanta/2357282 to your computer and use it in GitHub Desktop.
Scan directory
<?php
$directory = "../scripts/";
$images = scandir($directory);
$ignore = Array(".", "..");
foreach($images as $dispimage)
{
if(!in_array($dispimage, $ignore))
{
$files=$directory.$dispimage;
?>
<br>
<a href="<?php echo $files;?>"><?php echo $files;?></a>
<br>
<?php
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment