X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=bash%2Fdewey_decimal_system%2Fgenjson.php;fp=bash%2Fdewey_decimal_system%2Fgenjson.php;h=072f3c4ff09b11276179ec92e7f6b7635446685e;hb=0f2a9bdd80e5e730ed923c0d063c5f805aaaccd7;hp=0000000000000000000000000000000000000000;hpb=359fba904b16c12b0c334a3d9e6a1790056db661;p=mirrors%2FPrograms.git diff --git a/bash/dewey_decimal_system/genjson.php b/bash/dewey_decimal_system/genjson.php new file mode 100755 index 0000000..072f3c4 --- /dev/null +++ b/bash/dewey_decimal_system/genjson.php @@ -0,0 +1,17 @@ +#!/usr/bin/php + $value) { + $dir[$key] = array_flip(scandir($path.'/'.$key, 0)); + unset($dir[$key]['.']); unset($dir[$key]['..']); + recursive_scandir($path.'/'.$key,$dir[$key]); + } +} + +$dds = array_flip(array('dds')); +recursive_scandir('./', $dds); + +//print_r($dds); //you can use this if you don't have JSON ext. +echo json_encode($dds);