1<!DOCTYPE html> 2<html lang="en" dir="ltr"> 3<head> 4 <title>Filetype icons</title> 5 6 <style> 7 body { 8 background-color: #ccc; 9 font-family: Arial; 10 } 11 12 .box { 13 width: 200px; 14 float: left; 15 padding: 0.5em; 16 margin: 0; 17 } 18 19 .white { 20 background-color: #fff; 21 } 22 23 .black { 24 background-color: #000; 25 } 26 </style> 27 28</head> 29<body> 30 31<?php 32$fi_list = ''; $fi_list32 = ''; 33foreach (glob('*.png') as $img) { 34 $fi_list .= '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; 35} 36foreach (glob('32x32/*.png') as $img) { 37 $fi_list32 .= '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; 38} 39echo '<div class="white box"> 40'.$fi_list.' 41</div> 42 43<div class="black box"> 44'.$fi_list.' 45</div> 46 47<br style="clear: left" /> 48 49<div class="white box"> 50'.$fi_list32.' 51</div> 52 53<div class="black box"> 54'.$fi_list32; 55?> 56</div> 57 58</body> 59</html> 60