1、http://pear.php.net/package/Services_JSON/download
2、
-
if(!function_exists(‘json_encode’))
-
{
-
include(‘JSON.php’);
-
function json_encode($val)
-
{
-
$json = new Services_JSON();
-
return $json->encode($val);
-
}
-
function json_decode($val)
-
{
-
$json = new Services_JSON();
-
return $json->decode($val);
-
}
-
}
出處 http://www.pcschool.com.tw/campus/share/lib/157/