search

Home  >  Q&A  >  body text

php - 微信开发验证服务器有效性

z

t

点击提交 首先url是能访问你的
我想知道有什么办法可以检测到 微信服务器给我发了什么 我好调试点

怪我咯怪我咯2787 days ago650

reply all(3)I'll reply

  • 阿神

    阿神2017-04-18 10:36:27

    What the WeChat server sends you is a data stream. The code can be written like this

    $postStr = file_get_contents('php://input');
    $logFile = date('Y-m-d').'wechatPost.log';
    file_put_contents($logFile,$postStr,8);        //去日志文件里查看

    reply
    0
  • PHPz

    PHPz2017-04-18 10:36:27

    Write statements in wechat.php and store all received parameters in the database
    $xml = $GLOBALS['HTTP_RAW_POST_DATA'];
    This can be used to receive xml data received by the server.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 10:36:27

    Look at WeChat’s documentation https://mp.weixin.qq.com/wiki

    reply
    0
  • Cancelreply