Text($wechat,$data);">
时间:2021-07-01 10:21:17 帮助过:38人阅读
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);
}
这样写了但是判断不出来
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);
}
这样写了但是判断不出来
每个case结束时要加 break;
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;
}