<code>switch($data['MsgType']){ case "text" : $this->Text($wechat,$data); case "event": if(!$data['EventKey']){ $text="没有EVENTKEY"; $this->logger("发送消息:\n".$text); $this->Text($wechat,$data); } $this->eventKey($wechat,$data); }</code>
这样写了但是判断不出来
回复内容:
<code>switch($data['MsgType']){ case "text" : $this->Text($wechat,$data); case "event": if(!$data['EventKey']){ $text="没有EVENTKEY"; $this->logger("发送消息:\n".$text); $this->Text($wechat,$data); } $this->eventKey($wechat,$data); }</code>
这样写了但是判断不出来
本文来源gaodai#ma#com搞@@代~&码*网/搞gaodaima代码
每个case结束时要加 break;
<code>switch($data['MsgType']){ case "text" : $this->Text($wechat,$data); break; case "event": if(!$data['EventKey']){ $text="没有EVENTKEY"; $this->logger("发送消息:\n".$text); $this->Text($wechat,$data); } $this->eventKey($wechat,$data); break;}</code>