No brain Operation Example
1. Locate the WeixinAction.class.php file, path: your version \pigcms\lib\action\home
2, Query function chat, in the chat () function to modify the return value
Copy the Code code as follows:
Return ' Str_replace ' (' Highsea ', ' Hi ', $str) ';//For instance
For, as follows:
Return ' Pro, please wait for hospitality service reply ~ ';
3, (optional) The last comment off the "Small Yellow Chicken" section (can not comment or can):
Copy the Code code as follows:
/* Small YELLOW chicken * *
/* $str = ' http://api.bd001.com/iMicms_com/api.php?key=free&appid=0&msg= '. UrlEncode ($name);
$json = Http::fsockopendownload ($STR);
if ($json = = False) {
$json = file_get_contents ($STR);
}
$json = Json_decode ($json, true);
$str = Str_replace (' Highsea ', $this->my, Str_replace (' Hint: ', $this->my. ' Remind you: ', Str_replace (' {br} ', ' \ n ', $json [' content '])); * *
• Summary: This operation will not affect the public number of other key words of the reply, only to answer the question (originally request small yellow chicken) now directly reply: "Pro, please wait for hospitality service reply ~"; If you need to modify other operating source code
• If you optimize it, you can:
Configure an answer (or request your own interface server) first, when the visitor replies, such as "small yellow chicken" and then request the interface of the small yellow chicken ... Source code is not an example of ~
Small partners Learn how to shut down the chat robot in the pigcms, hope this article can be helpful to everyone.