From 530bba11d54e755325c3457c365733375082e8a3 Mon Sep 17 00:00:00 2001 From: haturatu Date: Mon, 2 Sep 2024 21:58:53 +0900 Subject: first commit --- index.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 index.php (limited to 'index.php') diff --git a/index.php b/index.php new file mode 100644 index 0000000..c639b21 --- /dev/null +++ b/index.php @@ -0,0 +1,54 @@ +"; +echo ""; +echo ""; +echo ""; +echo ""; +echo "Files"; +echo ""; +echo ""; +echo ""; + +echo "
"; +echo "

Index of: " . htmlspecialchars($directory) . "

"; +echo ""; +echo "
"; +echo ""; +echo ""; + +function formatSize($bytes) { + $units = array('B', 'KB', 'MB', 'GB', 'TB'); + $bytes = max($bytes, 0); + $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); + $pow = min($pow, count($units) - 1); + $bytes /= (1 << (10 * $pow)); + return round($bytes, 2) . ' ' . $units[$pow]; +} +?> + -- cgit v1.2.3