当前位置: 编程技术>php
php汉字转码示例
来源: 互联网 发布时间:2014-08-30
本文导语: 1,json文件 代码示例: querys.json: {"cities":["u4e0au6d77","u4e1cu839e","u4e2du5c71","u4e3du6c34","u4e4cu9c81u6728u9f50","u4f5bu5c71","u4fddu5b9a","u5170u5dde","u5317u4eac","u5357u4eac","u5357u5b81","u5357u660c","u5357u901a","u8d35u9633","u8fdeu4e91u6e2f","u90a2u53f0","u90afu90f...
1,json文件
代码示例:
querys.json:
{"cities":["u4e0au6d77","u4e1cu839e","u4e2du5c71","u4e3du6c34","u4e4cu9c81u6728u9f50","u4f5bu5c71","u4fddu5b9a","u5170u5dde","u5317u4eac","u5357u4eac","u5357u5b81","u5357u660c","u5357u901a","u8d35u9633","u8fdeu4e91u6e2f","u90a2u53f0","u90afu90f8","u90d1u5dde","u91cdu5e86","u91d1u534e","u94f6u5ddd","u9547u6c5f","u957fu6625","u957fu6c99","u9752u5c9b"]}
{"cities":["u4e0au6d77","u4e1cu839e","u4e2du5c71","u4e3du6c34","u4e4cu9c81u6728u9f50","u4f5bu5c71","u4fddu5b9a","u5170u5dde","u5317u4eac","u5357u4eac","u5357u5b81","u5357u660c","u5357u901a","u8d35u9633","u8fdeu4e91u6e2f","u90a2u53f0","u90afu90f8","u90d1u5dde","u91cdu5e86","u91d1u534e","u94f6u5ddd","u9547u6c5f","u957fu6625","u957fu6c99","u9752u5c9b"]}
2,php汉字转码文件 test.php
代码示例: