The debug with its own message interface was successfully responded to, but the public number was not answered. And I found that in PHP I added a code to insert the database, and found that it was not running at all (the interface is running when debugging). What is the reason?
Valid (); }else{$this->responsemsg (); }} Private Function Responsemsg () {//get post data, May is due to the different environments $postStr = $GLOBALS ["Http_raw_post_data"]; Extract post Data if (!empty ($POSTSTR)) {/* Libxml_disable_entity_loader is to prevent XML Externa L Entity Injection, the best of the "to" check the validity of XML by yourself */Libxml_di Sable_entity_loader (TRUE); $POSTOBJ = simplexml_load_string ($postStr, ' simplexmlelement ', libxml_nocdata); $fromUsername = $POSTOBJ->fromusername; $toUsername = $POSTOBJ->tousername; $keyword = Trim ($postObj->content); $time = time (); $TEXTTPL = "
%s
! [cdata[%s]]>
%s
msgtype> %s
%s
0
"; if (!empty ($keyword)) {$msgType = "text"; $CONTENTSTR = "Welcome to WeChat world!"; $RESULTSTR = sprintf ($TEXTTPL, $fromUsername, $toUsername, $time, $msgType, $keyword); Echo $resultStr; }else{echo "Input something ..."; }}else {echo ""; Exit }} Private Function Test ($content) {$m = m (' list '); return $m->execute ("UPDATE list SET website = ' {$content} ' WHERE name = ' Test '"); }}
Reply content:
The debug with its own message interface was successfully responded to, but the public number was not answered. And I found that in PHP I added a code to insert the database, and found that it was not running at all (the interface is running when debugging). What is the reason?
Valid (); }else{$this->responsemsg (); }} Private Function Responsemsg () {//get post data, May is due to the different environments $postStr = $GLOBALS ["Http_raw_post_data"]; Extract post Data if (!empty ($POSTSTR)) {/* Libxml_disable_entity_loader is to prevent XML Externa L Entity Injection, the best of the "to" check the validity of XML by yourself */Libxml_di Sable_entity_loader (TRUE); $POSTOBJ = simplexml_load_string ($postStr, ' simplexmlelement ', libxml_nocdata); $fromUsername = $POSTOBJ->fromusername; $toUsername = $POSTOBJ->tousername; $keyword = Trim ($postObj->content); $time = time (); $TEXTTPL = "
%s
! [cdata[%s]]>
%s
msgtype> %s
%s
0
"; if (!empty ($keyword)) {$msgType = "text"; $CONTENTSTR = "Welcome to WeChat world!"; $RESULTSTR = sprintf ($TEXTTPL, $fromUsername, $toUsername, $time, $msgType, $keyword); Echo $resultStr; }else{echo "Input something ..."; }}else {echo ""; Exit }} Private Function Test ($content) {$m = m (' list '); return $m->execute ("UPDATE list SET website = ' {$content} ' WHERE name = ' Test '"); }}
... You do not post code how to analyze
Are you going to let the couple pinch the finger for you?
Follow the public number push is an event, see the development documentation
interface debugging, you can use File_put_content to log some information to log, send a message try, I was the same tune