Created
November 29, 2016 14:31
-
-
Save cezarderevlean/2029cac7b4e462086ce1cb172db72d54 to your computer and use it in GitHub Desktop.
show all images in a folder into a html page
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 | |
$dir = 'img'; | |
$files = scandir($dir); | |
$ext = '.png'; | |
foreach ($files as $img) { | |
if ( substr_compare($img, $ext, -strlen($ext), strlen($ext)) === 0 ) { | |
?> | |
<h2 style="font-family: monospace;"><?=$img?></h2> | |
<div style="text-align: center; margin-bottom: 100px;"> | |
<img src="img/<?=$img?>"> | |
</div> | |
<? | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$(document).ready(function() {
let images = [];
let canvas = document.createElement('canvas');
let ctx = canvas.getContext('2d');
let video = document.getElementById('video');
});