No brain operation examples
1, find 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 Code code as follows:
Return ' Str_replace (' Highsea ', ' Hi ', $str) ';//For example
For, as follows:
Return ' Pro, please reply to the Hospitality service ~ ';
3, (optional) The final comment off the "Small Yellow Chicken" section (you can not note can also):
Copy 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: The operation will not affect the public number of other key words reply, only for the answer does not come up with the question (originally is the request of small yellow chicken) now directly reply: "Pro, please wait for the hospitality service reply ~"; If you need to modify other operating source code
• If optimized, you can do this:
First the unified configuration of a response (or request their own interface server), when the visitor replies such as "small yellow chicken" and then request the small yellow chicken interface ... The source code is not an example ~
Small partners Learn how to shut down the chat robot in the pigcms, hope this article can be helpful to everyone.