blob: 1418c78ac5f611e745d72979a454b1026dccaeaa [file] [log] [blame]
maxwen94329062017-02-17 01:29:13 +01001<?php
2
3function list_files($path) {
4 $output = array();
5 $files = scandir($path);
6 if ($path == "./_h5ai" || $path == "./.bak") return $output;
7
8 foreach ($files as $file) {
9 if ($file == "." || $file == ".." || strpos($file, '.html')
10 || $file == ".bak" || $file == "_h5ai") {
11 continue;
12 }
13
14 if (is_dir($path.'/'.$file)) {
15 } else {
16 $output[] = array("filename"=>$file, "timestamp"=>filemtime($path.'/'.$file));
17 }
18 }
19
20 return $output;
21}
22
23//chdir("../");
24echo json_encode(list_files("."));
25
26
27
28
29?>
30