Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $exclude = array('.','..');
- $dir = __DIR__ . '/images';
- $files = scandir($dir);
- $files_ex = array_values(array_diff($files, $exclude));
- $rand = rand(0,count($files_ex)-1);
- ?>
- <html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <style>
- .center
- {
- display: block;
- margin-left: auto;
- margin-right: auto;
- width: 40%;
- }
- </style>
- </head>
- <body bgcolor="#d7dcd4">
- we be debugging mofo
- <br>
- <img class="center" src="images/<?php echo $files_ex[$rand]; ?>">
- <br>
- <?php
- foreach ($files_ex as $f)
- {
- echo "<br>$f\n";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement