小程序
Last updated
Last updated
wx.request({
url: 'http://localhost:3000/whoami.php', //仅为示例,并非真实的接口地址
data: {
name: 'calvin',
other: ''
},
header: {
'content-type': 'application/json' // 默认值
},
success (res) {
console.log(res.data)
}
})<?php
$name = $_REQUEST['name'];
echo "i am $name"
?>