aboutsummaryrefslogtreecommitdiff
path: root/images/browsers/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'images/browsers/index.php')
-rwxr-xr-ximages/browsers/index.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/images/browsers/index.php b/images/browsers/index.php
new file mode 100755
index 0000000..84c0b5c
--- /dev/null
+++ b/images/browsers/index.php
@@ -0,0 +1,28 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <link rel="stylesheet" href="/style.css" />
+ <title>Bloggings</title>
+ </head>
+ <body>
+ <header>
+ <div class="center">
+ <h1>Bloggings</h1>
+ </div>
+ <a href="/index.php">Back</a>
+ <hr />
+ </header>
+<h2><?php echo dirname($_SERVER['SCRIPT_NAME']);?></h2>
+ <?php
+ $images = glob("./*.{jpg,jpeg,gif,png,bmp,webp,webP,svg}", GLOB_BRACE);
+ sort ($images);
+ foreach ($images as $i) {
+ $img = basename($i);
+ $caption = ucfirst(substr($img, 0, strrpos($img, ".")));
+ printf("<figure><img src='./%s'/><figcaption>%s</figcaption></figure>", $img, $caption);
+ }
+ ?>
+</body>
+</html>