发布网友 发布时间:2022-04-27 01:43
共2个回答
热心网友 时间:2023-11-16 05:27
if($MsgType=='event'){
$MsgEvent = $postObj->Event;
if ($MsgEvent=='subscribe') {
$arr[] = "[愉快]";
echo $this->make_xml("text",$arr);
exit;
}else if ($MsgEvent=='CLICK') {
$EventKey = $postObj->EventKey;
// $EventKey = trim($postObj->EventKey);
$arr[] = $EventKey;
/*******************************/
/* switch ($EventKey)
{
case "VCX_ABOUTME":
$arry[]="Hello world";
//$arr[] = $EventKey;
echo $this->make_xml("text",$arr);
break;
// case "VCX_JOBINFORMATION":
// $arry[]=$EventKey ;
// echo $this->make_xml("news",$arr);
// break;
default:
$arry[] = "What did you say".$EventKey;
echo $this->make_xml("text",$arr);
break;
}
*/
/**********************************/
echo $this->make_xml("text",$arr);
exit;
}
}
}else {
echo "this a file for weixin API!";
exit;
}追问这个改了哪儿?能标出来吗
追答$arry[] = "What did you say".$EventKey;
echo $this->make_xml("text",$arr);
break;
}
*/
就多加了这个 */
热心网友 时间:2023-11-16 05:27
没懂你问题- -追问就是这个里面我注释掉了自己写的switch,这段代码可以运行,结果是直接返回evenkey的值,但是我想根据判断evenkey的值,返回不同的东西