为什么我没有打印“11111111111”?我正在解析星号 ami 输出。
foreach($pieces as $val)
{
$pieces1 = explode("\n", $val);
echo ("$pieces1[0]\n");
if("$pieces1[0]" == "Response: Goodbye"){
echo("11111111111");
}
}
}
Asterisk Call Manager/1.1
Event: FullyBooted
Response: Success
Event: CoreShowChannel
Event: CoreShowChannel
Event: CoreShowChannelsComplete
Response: Goodbye