Last active
December 10, 2015 00:59
-
-
Save walterdavis/4355006 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Directory Listing</title> | |
<base target="_blank" /> | |
</head> | |
<body> | |
<?php | |
$out = ''; | |
foreach(scandir(dirname(__FILE__)) as $file){ | |
if((substr($file, 0, 1) != '.') && ($file != basename(__FILE__))){ | |
$out .= '<p><a href="' . $file . '">' . $file . '</a></p>' . "\n"; | |
} | |
} | |
print $out; | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment