abstract:<?php include 'function.php'; $list = select('php_area','*','status=1 AND type=1','sort desc'); return_json(0,$list);<?ph
<?php include 'function.php'; $list = select('php_area','*','status=1 AND type=1','sort desc'); return_json(0,$list);
<?php include 'function.php'; if(empty($_POST['area_id'])){ return_json(1,'id不能为空'); } $list = select('php_area','*','status=1 AND area_pid='.$_POST['area_id'],'sort desc'); return_json(0,$list);
标题:省市区
地址:one.php
two.php
传值:
area_id id
返回值:
{
"code": 0,
"msg": "success",
"data": {
}
}
错误码:
1id不能为空
Correcting teacher:韦小宝Correction time:2019-02-27 11:05:13
Teacher's summary:写的很不错 返回的json中注意不要把重要的东西返回出去咯