diff options
author | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-07-23 18:14:58 +0100 |
---|---|---|
committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-07-23 18:14:58 +0100 |
commit | bb5e67eb0f7599683cdaf6f2f693e7b5c7aff56c (patch) | |
tree | 8cc31f0c6cea28ff95b175e4a9e93b79dcb1f0bf | |
parent | 2e019a75fc16f20a2c0dffebea02994e0dec057b (diff) |
Ensure all filenames are UTF-8 encoded and also add a raw output mode
-rw-r--r-- | index.php | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -237,7 +237,7 @@ while ($this_array = each($new_array)){ break; } - $listing[$listsize]['filename'] = $value; + $listing[$listsize]['filename'] = utf8_encode($value); $listing[$listsize]['type'] = $icon; $listing[$listsize]['modified'] = $key; $listing[$listsize]['size'] = $size_array[$key]; @@ -286,5 +286,7 @@ for ($i = 0; $i < count($listing); $i++) { <?php } else if ($_GET['format'] == "json") { echo json_encode($listing); +} else if ($_GET['format'] == "raw") { + print_r($listing); } ?> |