Files
DomFramework/tools/dbjsonDecode.php

19 lines
360 B
PHP
Executable File

#!/usr/bin/php
<?php
if (! isset($argv[1])) {
die("No file to decode provided\n");
}
$file = $argv[1];
if (! file_exists($file)) {
die("File $file not found\n");
}
if (! is_readable($file)) {
die("File $file not readable\n");
}
if (! is_writeable($file)) {
die("File $file not writeable\n");
}
print_r(json_decode(file_get_contents($file)));