Now I want to have it so that the script echoes out the contents of the current directory and links them. The only problem is it also echoes folders and other directorys like "." and ".." . How can I filter those out?
Heres the code
<?php
$cdir = getcwd();
$currentfile = basename($PHP_SELF);
$currentdir = dirname($cdir);
$dh = opendir($cdir);
if (!$dh)
{
die;
}
$s = readdir($dh);
while ($s)
{
{
echo "<BR><a href=\"http://www.thedarkesthour.com/lol/$s> $s </A>";
$s = readdir($dh);
}
}
closedir($dh);
?>