PHP,Mysql根据经纬度计算距离并排序
/** * 接收页面传过来的经纬度,然后筛选出距离最近的商铺 */ public function CooperativeStoreIn() { $data = [ \'latitude\' => input(\'latitude\'), \'longitude\' => input(\'longitude\') ]; // PHP,...
阅读全文 →ThinkCmf 获取一级栏目导航
<?php $where['status'] = array('eq', 1); $where['id'] = array('neq', 1); $navs = M('nav')->where($where)->field('label,href')->select(); // 开始 foreach ($navs as $key=>$nav){ $href=htmlspecialchars_decode($nav['href']); $hrefold=$href; if(strpos($hrefold,"{")){//序列 化的数据  ...
阅读全文 →