【发布时间】:2015-07-23 05:35:02
【问题描述】:
我无法处理 JSON 解码错误。这是我的代码:
try {
$jsonData = file_get_contents($filePath) . ']';
$jsonObj = json_decode($jsonData, true);
}
catch (Exception $e) {
echo '{"result":"FALSE","message":"Caught exception: ' . $e->getMessage() . ' ~' . $filePath . '"}';
}
我是一名新的 PHP 程序员。抱歉,如果有问题。
【问题讨论】:
标签: php