再会。
$arr = array(1, "Hello");
json_encode($arr, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP);
当我使用代码时,我会注意到:
Notice: Use of undefined constant JSON_HEX_TAG - assumed 'JSON_HEX_TAG' in ....
Notice: Use of undefined constant JSON_HEX_APOS - assumed 'JSON_HEX_APOS' in ....
Notice: Use of undefined constant JSON_HEX_QUOT - assumed 'JSON_HEX_QUOT' in ....
Notice: Use of undefined constant JSON_HEX_AMP - assumed 'JSON_HEX_AMP' in ....
Warning: json_encode() expects exactly 1 parameter, 2 given in ....
有谁知道我为什么会收到通知?