$url = ‘http://api.map.baidu.com/location/ip?ak=67jMQ5DmYTe1TLMBKFUTcZAR‘;$data = file_get_contents($url);print_r(json_decode...
function test(id) { var str = "{:url('documents/edit', ['id'=>'pid'])}"; var url=str.replace('pid',id);//或者 str =...
一、方法一function get_rand($proArr) { $result = array(); foreach ($proArr as $key => $val) { $arr[$key] = $val['v'];...
$n = date("Y-m-d");$w=date('w',strtotime($n));$beginweek=strtotime("$n -".($w ? $w - 1 : 6).' days');$endweek=$beginweek ...
js版本function toTree(data) { let result = [] if (!Array.isArray(data)) { ...