PIGCMS 如何关闭聊天机器人,pigcms聊天机器人
无脑操作举例
1、找到 WeixinAction.class.php 文件,路径: 你的版本\PigCms\Lib\Action\Home
2、查询 function chat ,在 chat() 函数中修改 return 值
复制代码 代码如下:
return 'str_replace('highsea', 'hi', $str)';//举个例子
为,如下:
return '亲,请等待客服回复~';
3、(可选)最后注释掉“小黄鸡”部分(可以不注释也可以):
复制代码 代码如下:
/*小黄鸡*/
/*$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('提示:', $this->my . '提醒您:', str_replace('{br}', "\n", $json['content'])));*/
•总结:该操作不会影响公众号其他关键字的回复,只针对回答不上来的问题(本来是请求 小黄鸡 )现在直接 回复:“亲,请等待客服回复~”;如需修改其他得操作源码
•如果优化一下,可以这样:
先统一配置一个回答(或者请求 自己的接口服务器 ),当访客回复如“小黄鸡”时再请求小黄鸡的接口…… 源码就不举例了~
小伙伴们学会如何在PIGCMS里关闭聊天机器人了吧,希望本文能对大家有所帮助。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment