Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / examples / grid / get-images.php
1 <?php
2 $dir = "images/thumbs/";
3 $images = array();
4 $d = dir($dir);
5 while($name = $d->read()){
6     if(!preg_match('/\.(jpg|gif|png)$/', $name)) continue;
7     $size = filesize($dir.$name);
8     $lastmod = filemtime($dir.$name)*1000;
9     $images[] = array('name'=>$name, 'size'=>$size,
10                         'lastmod'=>$lastmod, 'url'=>$dir.$name);
11 }
12 $d->close();
13 $o = array('images'=>$images);
14 echo json_encode($o);