while($rows=mysql_fetch_row($sql2))
{
????$template??=?"<xml>
??????????????????<ToUserName><![CDATA[%s]]></ToUserName>
??????????????????<FromUserName><![CDATA[%s]]></FromUserName>
??????????????????<CreateTime>%s</CreateTime>
??????????????????<MsgType><![CDATA[%s]]></MsgType>
??????????????????<Content><![CDATA[%s]]></Content>
??????????????????</xml>";
????$fromUser=$postObj->ToUserName;
????$toUser=$postObj->FromUserName;
????$time=time();
????$content='訂單編號:'.$bianhao."\n".'發(fā)貨人:'.$fname."\n".'發(fā)貨人電話:'.$fphone."\n".'貨物狀態(tài):'.$zhuangtai."\n".'狀態(tài)時間:'.$dates."\n".'快遞公司:'.$kuaidi."\n".'快遞單號:'.$danhao;
????$msgType='text';
????echo?sprintf($template,$toUser,$fromUser,$time,$msgType,$content);
}這樣查看結(jié)果的話會輸出根據(jù)查詢結(jié)果所顯示條數(shù)一樣的數(shù)據(jù)并在微信中輸出一條,其中CreateTime中的值是一樣的。如何輸出根據(jù)查詢結(jié)果的實際數(shù)據(jù)啊。。??赡芪艺f的不清楚,表中有3、4條數(shù)據(jù)。。。代碼我放到網(wǎng)頁中查詢數(shù)據(jù)可以顯示出來,但微信中就只顯示一條數(shù)據(jù)。。。應(yīng)該如何修改才能在微信查詢時顯示這3、4條數(shù)據(jù)
微信讀取數(shù)據(jù)多條純文本回復只顯示一條數(shù)據(jù)
homedevise
2016-10-31 14:11:52