Hello. I've used this code snippet to list directory contents, but it lists the contents in a line without blanks. For example,
List of files:
Autumn Leaves.jpgCreek.jpgDesert Landscape.jpgphpshow.phpindex.phpfilelist.php
I'd like to have a line break between file names. Can anyone help me with this?
<?php
if ($handle = opendir(' . ')) {
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$thelist .= '<a href="'.$file.'">'.$file.'</a>';
}
}
closedir($handle);
}
?>
<P>List of files:</p>
<P><?=$thelist?></p>