php接收微信小程序的post请求

浏览:5287 发布日期:2018/04/13 分类:ThinkPHP5专区
出现php无法获取到小程序传递的数据情况,无论是get还是post都不行wx.request({
        url: 'http://www.tp5.com/login/login',
        data: {
          userName:'hello',
          psw:'123'
        },
        method:'POST',
        header: {
          'Content-Type': 'application/x-www-form-urlencoded'
        },
        success:function(result){
          console.log(result);
        }
       
      })


php


<?php
echo $_POST['userName'];
最佳答案
评论( 相关
后面还有条评论,点击查看>>