Created
February 2, 2012 03:40
-
-
Save fabioluciano/1721276 to your computer and use it in GitHub Desktop.
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 require_once 'DataUri.php'; ?> | |
<!DOCTYPE html> | |
<html dir="ltr"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>base64</title></title> | |
<script type='text/javascript' src='js.js'></script> | |
<link rel="stylesheet" href="css.css" type="text/css" media="screen" /> | |
</head> | |
<body> | |
<div class="image-list"> | |
<?php | |
$dir = './imgs/'; | |
$iterator = new DirectoryIterator($dir); | |
foreach ($iterator as $fileinfo) { | |
if ($fileinfo->isFile()) { | |
$uri = new DataUri($dir. $fileinfo->getFileName()); | |
echo '<img src="' . $uri->generate() . '" />' . PHP_EOL; | |
} | |
} | |
?> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment