Basic Development of WeChat background

Source: Internet
Author: User
Do you have nothing to write? Php load message template include_once (model. php); get data $ postStr $ GLOBALS [HTTP_RAW_POST_DATA]; if (! Empty ($ postStr) {parse data $ postObjsimplexml_load_string ($ postStr, SimpleXMLElement, LIBXML_NOCDATA); $ fromUsername

Do you have nothing to write? Php // load the message template include_once ("model. php"); // get data $ postStr = $ GLOBALS ["HTTP_RAW_POST_DATA"]; if (! Empty ($ postStr) {// parse data $ postObj = simplexml_load_string ($ postStr, 'simplexmlelement', LIBXML_NOCDATA); $ fromUsername

You have nothing to write. <无>
  FromUserName; $ toUsername = $ postObj-> ToUserName; $ form_MsgType = $ postObj-> MsgType; if ($ form_MsgType = "text ") {$ form_Content = trim ($ postObj-> Content) ;}$ msgType = "text"; // assembled. This function is very interesting $ resultStr = sprintf ($ textTpl, $ fromUsername, $ toUsername, $ time, $ msgType, $ form_Content); echo $ resultStr;} else {$ msgType = "text"; $ resultStr = sprintf ($ textTpl, $ fromUsername, $ toUsername, $ time, $ msgType, 'not a text input'); echo $ ResultStr; exit ;}?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.