Hexo 部署测试

Hexo 部署测试

1:通过日志方式统计
1
2
3
4
5
6
7
file_put_contents("loc.log", microtime(true).'_end'."-----$lat@2".PHP_EOL, FILE_APPEND);

file_put_contents('exelog/'.time().'.log', var_export(Yii::$app->request->post(), true));


$postdata = file_get_contents("php://input");
$postdata = json_decode($postdata,true);
2:二维数组指定字段排序
1
2
3
4
5
array_multisort (array_column($citiesMddBaseInfo, ‘hot’), SORT_DESC, $citiesMddBaseInfo);

array_multisort(array_column($hotelList, 'price'), SORT_ASC, $hotelList);

array_multisort($hotelList,SORT_ASC, array_column($hotelList, 'price'));