赞
踩
json_encode($arr,448)等于设置了多个参数。
448=64+128+256 64即不转换\ 128 不转换\n \r \t之类的空白 256中文输出
JSON_UNESCAPED_SLASHES => 64
JSON_PRETTY_PRINT => 128
JSON_UNESCAPED_UNICODE => 256
JSON_HEX_TAG => 1
JSON_HEX_AMP => 2
JSON_HEX_APOS => 4
JSON_HEX_QUOT => 8
JSON_FORCE_OBJECT => 16
JSON_NUMERIC_CHECK => 32
JSON_UNESCAPED_SLASHES => 64
JSON_PRETTY_PRINT => 128
JSON_UNESCAPED_UNICODE => 256
JSON_ERROR_DEPTH => 1
JSON_ERROR_STATE_MISMATCH => 2
JSON_ERROR_CTRL_CHAR => 3
JSON_ERROR_SYNTAX => 4
JSON_ERROR_UTF8 => 5
JSON_OBJECT_AS_ARRAY => 1
JSON_BIGINT_AS_STRING => 2
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。