1 json__decode() 格式化输出
1 | json = '"{"status":"1","count":"1","info":"OK","infocode":"10000","lives":[{"province":"\u5e7f\u4e1c","city":"\u6df1\u5733\u5e02","adcode":"440300","weather":"\u6674","temperature":"20","winddire ction":"\u897f\u5317","windpower":"\u22643","humidity":"74","reporttime":"2019-10-28 23:15:45}]}"'; |
加了参数JSON_PRETTY_PRINT和JSON_UNESCAPED_UNICODE后会格式化,在命令行打印就没那么乱了
计算坐标距离
1 | /** |
- 注: 摘录自
计算坐标附近坐标
1 | // 注: 使用的是laravel 的DB数据库驱动 |
`