引入文件
require_once './static/lib/AipContentCensor.php';//自定义路径
/* * 敏感词SDK * */ const APP_ID = ''; const API_KEY = ''; const SECRET_KEY = ''; public static function text($text){ $client = new \AipContentCensor(self::APP_ID, self::API_KEY, self::SECRET_KEY); $result = $client->textCensorUserDefined($text); return json($result); }