数据库
数据库下载地址:https://files.cnblogs.com/files/fan-bk/packet_region.zip
php
where(['parent_id' => $id])->select(); $opt = ''; foreach($region as $key=>$val){ $opt .= ""; } echo json_encode($opt); die; } $region = Db::name('packet_region')->where(['level_type' => 1])->select(); $this->assign('region', $region); return $this->fetch(); } public function hello($name = 'ThinkPHP5') { return 'hello,' . $name; } }
html
Title
参考:http://www.thinkphp.cn/topic/41905.html