为什么PHP获取不到小程序传递的数据
wx.request({
url: ‘https://yffice.com/wx/sendmail2.php’,
data: {
name:‘e.detail.value.name’,
phonenumber:‘e.detail.value.phonenumber’
},
header: {
‘content-type’: ‘application/json’
},
success: function (res) {
console.log(res.data)
}
})
<?php
$name=$_GET[“name”];
$mobile=$_GET[“phonenumber”];
echo $name;
echo $mobile;
代码如图 php获取不到name和phonenumber