I am trying to list the files in a directory. The following code does it
but I really want to list the file on their own lines. Can some one help??
Shawn
<?php
$strDirectory = "BulkPost";
$DirHandle = opendir($strDirectory);
if ( $DirHandle )
{
// Get a list of files
while ($FileName = readdir( $DirHandle ) )
{
// Eliminate the root directories
if ( $FileName != "." & $FileName != "..")
{
// Add the file name to the array
$asFiles[] = $FileName;
echo $FileName . "
\n";
}
}
closedir( $DirHandle );
}
?>