我的前端代码是这个
mui.ajax('http://192.168.0.107:88/dbserver/reg.php', {
data: {
username: use_rname.value,
usernicheng:u_nicheng.value,
password: user_password.value,
email:user_email.value
},
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
timeout: 5000, //超时时间设置为5秒;
success: function(data) {
//服务器返回响应,根据响应结果,分析是否登录成功;
},
error: function() {
plus.nativeUI.toast('ajax 出错');
console.log(type);
return;
}
});
PHP 是这样取数据的
@$username=$_POST['username'];
@$usernicheng=$_POST['usernicheng'];
@$password=$_POST['password'];
@$email=$_POST['email'];
echo '<pre>';
print_r($username);
求指导~
发送过去以后PHP
0 个回复