<?php namespace app\admin\controller; use app\admin\model\Area as areaModel; use think\facade\Db; class Abc extends Base{ public function index(){ $areaList = array(); $rootDomain = 'df81.com'; // 其中id为主键 $cityList = Db::name('area')->where('is_domain',1)->where('lang',$default_lang)->field('id,urlroute,bind_domain')->select(); foreach($cityList as $cityRs){ $areaList[] = array('id'=>$cityRs['id'],'bind_domain'=>$cityRs['urlroute'].'.'.$rootDomain); } if(!empty($areaList)){ $areaModule = new areaModel; $areaModule->saveAll($areaList); } } }
上一篇: 《建站管家》二次开发文档
下一篇: remote: Support for password authentication was removed on August 13, 2021的解决方法