Last active
July 18, 2018 13:24
-
-
Save st-f/55a040a9abb7e4848458f4638709a986 to your computer and use it in GitHub Desktop.
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
<html> | |
<head> | |
<meta charset=”utf-8"> | |
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”> | |
<meta name=”viewport” content=”width=device-width, initial-scale=1"> | |
</head> | |
<body style=”background: #111111"> | |
<?php | |
$dir = getcwd() . “/(YOUR_PICS_FOLDER_HERE)”; | |
$files = glob($dir . “/*.{jpg,png}”, GLOB_BRACE); | |
usort( $files, function( $a, $b ) { return filemtime($b) — filemtime($a); } ); | |
foreach($files as $phpfile) | |
{ | |
echo “<a href=’” .str_replace(“(YOUR_PICS_FOLDER_HERE_ABSOLUTE)”, “”, “$phpfile”) .”’ target=’_blank’>”; | |
echo str_replace(“(YOUR_PICS_FOLDER_HERE_ABSOLUTE)”, “”, “<img src=’$phpfile’ alt=’’ width=’22%’ height=’100%’ style=’vertical-align:middle; padding:10px; max-height:1000px; min-height:20%;’>\n”); | |
echo “</a>”; | |
} | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment