Listing Files and Directories with PHP
Listing all files and directories using PHP 5.
<?php
$files = array(); $dir = dir(".");
while(false!==($file=$dir->read())):
if(($file{0}!=".") && ($file{0}!="~") && (substr($file, -3)!="LCK")
&& ($file!=basename($_SERVER["PHP_SELF"]))):
...
Written by Sean Behan on 06/17/2012