파일 경로 변경

This commit is contained in:
2018-06-15 00:38:05 +09:00
parent cf32fb402d
commit fa91fc11e1
+9 -2
View File
@@ -23,7 +23,14 @@ foreach ($raw_img_list as $path) {
continue;
}
$path = substr($path, $pos + 9);
$img_list[] = $path;
$dpath = dirname($path);
$filename = basename($path);
if(!\key_exists($dpath, $img_list)){
$img_list[$dpath] = [];
}
$img_list[$dpath][] = $filename;
}
file_put_contents('list.json', json_encode($img_list, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
file_put_contents('list.json', json_encode($img_list, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));