rendered paste body<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style.css" type="text/css" /> <title>Gallery Testing</title> </head> <body> <div id="wrap"> <div id="gallery"> <ul<?phpif(isset($_GET['dir']) && is_dir($_GET['dir'])) { $dir = $_GET['dir']; } else { $dir = './img'; } $exclude[] = ""; if (is_dir($dir)) { if ($handle = opendir($dir)) { while (($fp = readdir($handle)) !== false) { if ($fp != '.' && $fp != '..') { if (!in_array($fp, $exclude)) {?>><li><a href="page.php?image=<?php echo $fp;?>"><img src="img/<?php echo $fp; ?>" width="150" height="113" alt="image" /></a></li<?php } } } closedir($handle); } }?>></ul> <br /> </div> </div> </body></html>