1. 程式人生 > >微信消息推送中換行和超鏈接的使用

微信消息推送中換行和超鏈接的使用

中心 time div user www. echo type name create

if($postObj->Event == ‘CLICK‘ && $postObj->EventKey == ‘tel‘){
                $toUser = $postObj->FromUserName;
                $fromUser = $postObj->ToUserName;
                $time = time();
                $Msgtype = ‘text‘;
                //$Content = $postObj->FromUserName;
$Content = "如果您想通過APP解決問題,可以打開陪它APP,點擊設置中心的問題反饋即可將您的問題及時反饋給我們。\n\n 如果您想咨詢電話客服,可以撥打400-902-7011(服務時間:9:00-18:00) \n\n 此外,您可以填寫APP上的問卷調查幫助我們更好的改善APP功能。<a href=‘https://www.peita.net‘>進入官網</a>"; $template = "<xml> <ToUserName><![CDATA[%s]]></ToUserName> <FromUserName><![CDATA[%s]]></FromUserName> <CreateTime>%s</CreateTime> <MsgType><![CDATA[%s]]></MsgType> <Content><![CDATA[%s]]></Content> </xml>
"; $info = sprintf($template,$toUser,$fromUser,$time,$Msgtype,$Content); echo $info; }

微信消息推送中換行和超鏈接的使用