PHP,Mysql根据经纬度计算距离并排序
/** * 接收页面传过来的经纬度,然后筛选出距离最近的商铺 */ public function CooperativeStoreIn() { $data = [ \'latitude\' => input(\'latitude\'), \'longitude\' => input(\'longitude\') ]; // PHP,...
阅读全文 →wampserver配置多站点
1、在“httpd.conf”文件中查找:Include conf/extra/httpd-vhosts.conf,去掉前面的注释#。2、在“httpd.conf”文件中配置好项目路径3、打开extra/httpd-vhosts.conf文件;在最后加入类似内容:(文件路径是自己安装程序的路径)<VirtualHost *:80> ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "D:/Work/project/2015/baoguang"(这是你放程序的文件路径) ServerName www.bao...
阅读全文 →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,"{")){//序列 化的数据  ...
阅读全文 →xampp 配置多域名方法
1、D:xamppapacheconf 路径 找到 httpd.conf 文件 第238 239行默认路径,改为自己项目对应路径 DocumentRoot "D:/Work/project/2015"
YourPHP在首页提交留言返回首页错乱问题
只需要把/Yourphp/Tpl/Home/Default下的layout Home_header Index_index Home_footer 都复制一份上传到 /Yourphp/Tpl/User/Default下
阅读全文 →