source:
trunk/web/addons/job_monarch/lib/extjs-30/examples/view/get-images.php
@
625
Last change on this file since 625 was 625, checked in by ramonb, 15 years ago | |
---|---|
File size: 407 bytes |
Line | |
---|---|
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); |
Note: See TracBrowser
for help on using the repository browser.