Directory Index";
echo "
";
// Loop through the directory contents
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
echo "- $entry
";
}
}
echo "
";
// Close the directory handle
closedir($handle);
} else {
echo "Unable to open directory.
";
}
} else {
// Show the login form if the user is not authenticated
?>
Passcode Protected Directory
Enter Passcode
$error"; } ?>