Created
June 16, 2013 17:31
-
-
Save proweb/5792759 to your computer and use it in GitHub Desktop.
Easy PHP localhost landing page
This file contains hidden or 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 content="text/html; charset=utf-8" http-equiv="Content-Type"> | |
<title>localhost</title> | |
</head> | |
<body> | |
<h1>It Works!</h1> | |
<ul> | |
<?php | |
$dirs = array_filter(glob('*'), 'is_dir'); | |
foreach ($dirs as $key => $value) { | |
echo('<li><a href="'.$value.'">'.$value.'</a></li>'); | |
} | |
?> | |
<!-- I have my phpMyAdmin located somewhere else --> | |
<li><a href="phpmyadmin">phpmyadmin</a></li> | |
</ul> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment