示例#1
0
     //输出结果
     exit;
 } else {
     if (strstr($keyword, "答案")) {
         $e = new Daan();
         $contentStr = $e->responseMsg($fromUsername, $keyword) . $hint_str;
         $resultStr_text = sprintf($textTpl, $fromUsername, $toUsername, $time, "text", $contentStr);
         echo $resultStr_text;
         //输出结果
         exit;
     } else {
         if (strstr($keyword, "@") || strstr($keyword, "电话")) {
             //若关键字为“@ 或 电话”就查询电话号码
             $keyword = str_replace($dictionary, "", $keyword);
             $a = new telephone();
             $contentStr = $a->responseMsg($keyword, $fromUsername);
             $resultStr_text = sprintf($textTpl, $fromUsername, $toUsername, $time, "text", $contentStr);
             echo $resultStr_text;
             //输出结果
             exit;
         } else {
             if (strstr($keyword, "雷亚")) {
                 $b = new TheaterLeiYa();
                 $contentStr = $b->responseMsg();
                 $resultStr_text = sprintf($textTpl, $fromUsername, $toUsername, $time, "text", $contentStr);
                 echo $resultStr_text;
                 //输出结果
                 exit;
             } else {
                 if (strstr($keyword, "大剧院")) {
                     $a = new TheaterDaJuYuan();