login_user_id; $agoPwd = isset($_REQUEST['agoPwd']) ? $_REQUEST['agoPwd'] : ""; // 允许为空 $nowPwd = isset($_REQUEST['nowPwd']) ? $_REQUEST['nowPwd'] : ""; // 允许为空 if ($agoPwd ==''||$nowPwd==''){ $data['code'] = "1"; $data['info'] = "错误的请求参数"; return $data; } $md_agoPwd = md5($agoPwd); $md_nowPwd = md5($nowPwd); $changePWC = new ChangePWC(); $data =$changePWC ->changePW($user_id,$md_agoPwd,$md_nowPwd); return $data; } } $obj = new ChangePassword(); $data = $obj ->changePasswordC(); echo json_encode($data);