為什么在微信客戶端 (多圖文)圖片 沒(méi)有顯示而且 鏈接也打不開(kāi)呢
?$MType????? = strtolower($postObj->MsgType);
?? $toUser???? = $postObj->FromUserName;
?$fromUser?? = $postObj->ToUserName;
if($MType=='text'){
??? ??? ?
??????????
???
??????????? $info?????? =reponseNews($toUser,$fromUser);
??????????? echo $info ;
?? ??? ??? ?
???? }
function reponseNews($toUser,$fromUser){
??????? $arr = array(
??????? array(
????????? 'title'=>'ganmiao',
????????? 'description'=>"ganmiao is very cool",
????????? 'picUrl'=>'http://www.ganmiao.com/3.jpg',
????????? 'url'=>'http://www.ganmiao.com/wap.php',
??????? ),
??????? array(
????????? 'title'=>'hao123',
????????? 'description'=>"hao123 is very cool",
????????? 'picUrl'=>'https://www.baidu.com/img/bdlogo.png',
????????? 'url'=>'http://www.hao123.com',
??????? ),
??????? array(
????????? 'title'=>'qq',
????????? 'description'=>"qq is very cool",
????????? 'picUrl'=>'http://idcbgp.cn/static/img/common/logo.png',
????????? 'url'=>'http://www.qq.com',
??????? ),
?????? );
????????? $CreateTime?? = time();
????????? $MsgType????? = 'news';
????????? //$ArticlesCount= 1;
????????? $template???? ="
??????????????????????? <xml>
??????????????????????? <ToUserName><![CDATA[%s]]></ToUserName>
??????????????????????? <FromUserName><![CDATA[%s]]></FromUserName>
??????????????????????? <CreateTime>%s</CreateTime>
??????????????????????? <MsgType><![CDATA[%s]]></MsgType>
??????????????????????? <ArticleCount>".count($arr)."</ArticleCount>
??????????????????????? <Articles>";
????????? foreach ($arr as $k => $v) {
????????? $template???? .="?????????? ?
??????????????????????? <item>
??????????????????????? <Title><![CDATA[".$v['title']."]]></Title>
??????????????????????? <Description><![CDATA[".$v['description']."]]></Description>
??????????????????????? <PicUrl><![CDATA[".$v['picUrl']."]]></PicUrl>
??????????????????????? <Url><![CDATA[".$v['url']."]]></Url>
??????????????????????? </item>";?? ?
????????? }
????????? $template??? .="
??????????????????????? </Articles>
??????????????????????? </xml> ";
??????? $info?????? = sprintf($template,$toUser,$fromUser,$CreateTime,$MsgType);
??????? return $info;
?}
2016-03-18
使用非外網(wǎng)圖片要提前上傳