Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $files = array();
- $dir = opendir('cache00/');
- while ($file = readdir($dir)) {
- if ($file == '.' || $file == '..') {
- continue;
- }
- $files[] = $file;
- }
- sort($files);
- $a = array(
- array('img' => end($files)));
- $json = json_encode($a);
- header('Content-type: application/json');
- //echo json_encode($json);
- echo json_encode(end($files));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement