ci中post方式提交数据和接受数据

提交数据:

wx.request({
                url: that.globalData.host + '/album/saveUserInfo',
                method: 'POST',
                data: {
                  encryptedData: res.encryptedData,
                  iv: res.iv,
                  sessionKey: sessionKey
                },
                header: {
                  'content-type': 'application/x-www-form-urlencoded' // 默认值
                },
                success: res => {
                  console.log(res)
                }
              })

接受数据:

// echo $_POST['iv'];
echo $this->input->post('iv');

猜你喜欢

转载自www.cnblogs.com/maoriaty/p/9093208.html