多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
``` public function test7() { // 获取省份 $province = Db::name('region')->where(array('parent_id'=>0,'level'=>1))->select(); $this->assign('province',$province); return $this->fetch(); } /* * 获取地区 */ public function getRegion(){ $parent_id = input('parent_id'); $data = Db::name('region')->where("parent_id", $parent_id)->select(); $html = ''; if($data){ foreach($data as $h){ $html .= "<option value='{$h['id']}'>{$h['name']}</option>"; } } echo $html; } ```