代码中省略数据库部分!
header('content-type:text/html;charset=utf-8');if( strtolower( $postObj->MsgType) == 'text'){ if (!$rows){ $template = " %s "; $fromUser=$postObj->ToUserName; $toUser=$postObj->FromUserName; $time=time(); $content='暂无收货人手机号为:'.$sphone.'的订单信息'; $msgType='text'; echo sprintf($template,$toUser,$fromUser,$time,$msgType,$content); }else { $fname=$rows['fname']; $template = " %s "; $fromUser=$postObj->ToUserName; $toUser=$postObj->FromUserName; $time=time(); $content='发货人:'.$fname; $msgType='text'; echo sprintf($template,$toUser,$fromUser,$time,$msgType,$content); } }为什么接收的值为"发货人:??",如何解决,谢谢! |