json_decode()和json_encode()在thinkphp3.2中有哪些地方用到?
以上加载配置文件函数, 支持格式转换 仅支持一级配置,也用到json_decode()函数。
json_decode(file_get_contents($file), true)
file_get_contents() 函数把整个文件读入一个字符串中,第二个参数为true,把字符串(类似json的配置文件)强制转换为数组(键值对数组),return 返回键值对数组。