thinkphp5省市区三级联动例子

数据库

数据库下载地址: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

转载于:https://www.cnblogs.com/fan-bk/p/9890682.html

你可能感兴趣的:(php,数据库,javascript)