-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
43 lines (42 loc) · 1.2 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
$files = scandir(getcwd(), 1); // include file hidden
$files = preg_grep('/^([^.])/', scandir(getcwd(), 1)); // not include file hidden
$files = array_reverse($files);
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
?>
<html>
<head>
<title>Index of /</title>
<style type="text/css">
.document {
width: 30px;
max-width: 100%;
}
</style>
</head>
<body>
<h1>Index of /</h1>
<table>
<tbody>
<tr>
<th valign="top"><img class="document" src="doc.png" alt="[ICO]"></th>
<th><a href="?C=N;O=D">Name</a></th>
<!-- <th><a href="?C=M;O=A">Last modified</a></th>
<th><a href="?C=S;O=A">Size</a></th>
<th><a href="?C=D;O=A">Description</a></th> -->
</tr>
<tr><th colspan="5"><hr></th></tr>
<?php foreach ($files as $file) : ?>
<tr>
<?php if(!is_dir($file)) continue; ?>
<td valign="top"><img class="document" src="doc.png" alt="[DIR]"></td>
<td><?php echo '<a href="' . $file . '">'. $file .'</a>'; ?></td>
<!-- <td align="right">2016-11-13 11:28 </td>
<td align="right"> - </td>
<td> </td> -->
</tr>
<?php endforeach ?>
</tbody>
</table>
</body>
</html>