Return to Snippet

Revision: 18202
at September 23, 2009 15:55 by paulgrenwood


Initial Code
function list_files($dir)
{
	if(is_dir($dir))
  	{
  		if($handle = opendir($dir))
  		{
  			while(($file = readdir($handle)) !== false)
  			{
  				if($file != "." && $file != ".." && $file != "Thumbs.db")
  				{
  					echo '<a target="_blank" href="'.$dir.$file.'">'.$file.'</a><br>'."\n";
  				}
  			}
  			closedir($handle);
  		}
	}
}

Initial URL

                                

Initial Description

                                

Initial Title
List Directory Contents

Initial Tags
php, list, directory

Initial Language
PHP