Created
August 8, 2010 06:01
-
-
Save barce/513645 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
<?php | |
$title = $_SERVER['SCRIPT_NAME']; | |
?> | |
<html> | |
<head> | |
<title><?php echo $title ; ?></title> | |
<head> | |
<body bgcolor="#000000" text="#008F00" link="#008f00" vlink="#008fff"> | |
<table cellpadding="2" cellspacing="0" border="0" width="100%"><tr> | |
<td bgcolor="#333333"><font face="Arial,Helvetica" size="-1"><b><?php echo $title; ?> | |
</b></font></td> | |
</tr> | |
<tr><td><font face="Arial,Helvetica" size="-1"> | |
<? | |
$adirs = array(); | |
echo "<h4>directories</h4>\n"; | |
$dir2open = getcwd(); | |
if ($dir = @opendir("$dir2open")) { | |
while (($file = readdir($dir)) !== false) { | |
if (preg_match("/\.[a-z]*/", $file)) { | |
// donothing | |
} | |
else | |
{ | |
$adirs[] = $file; | |
echo "<a href=\"$file/\">$file</a><br>\n"; | |
} | |
} | |
closedir($dir); | |
} | |
echo "<h4>files</h4>"; | |
if ($dir = @opendir("$dir2open")) { | |
while (($file = readdir($dir)) !== false) { | |
if (preg_match("/luo*/", $file)) { | |
// do nothing | |
} | |
elseif (preg_match("/udpPort*/", $file)) { | |
} | |
elseif (preg_match("/\.[a-z]{1,}/", $file)) { | |
echo "<a href=\"$file\">$file</a> - " . filesize($file) . " bytes<br>\n"; | |
} | |
else | |
{ | |
// do nothing | |
} | |
} | |
closedir($dir); | |
} | |
?> | |
</td> | |
</tr> | |
</table> | |
<body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment