联系官方销售客服

1835022288

028-61286886

开发框架 版主:迅睿框架研发组
升级新版后,后台发布文章,自动提取关键字失败
类型:迅睿CMS 更新时间:2020-11-19 10:19:08

升级新版后,后台发布文章,自动提取关键字失败。 之前的版本可以

{xunruicms_img_title}

回帖
  • #1楼    迅睿框架创始人
    2020-10-30 10:45:38
    Chrome 0
    错误日志内容发来看看,方法是:http://help.xunruicms.com/658.html
  • 林正英
    #2楼    林正英
    2020-10-30 10:49:03
    Chrome 0
    要看日志啊
  • 哇塞
    #3楼    哇塞
    2020-10-30 10:49:44
    Chrome 0
    我以前升级也是这样,插件老大说要升级tag插件,或者把tag插件卸载了
  • perweb
    #4楼    perweb
    2020-10-30 10:51:36
    Chrome 0
    CRITICAL - 2020-10-30 10:45:40 --> Call to undefined method Phpcmf\Model\Tag\Tag::get_keywords()#SQL:SELECT *FROM `dr_member_group_index`WHERE `uid` = 1#URL:http://192.168.0.226:8020/index.php?s=api&c=api&m=getkeywords&title=%E7%83%AD%E5%8E%8B%E6%9C%BA&module=news&is_ajax=1#AGENT:Mozilla/5.0 (Windows NT 10.0 WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3776.400 QQBrowser/10.6.4212.400#REFERER:http://192.168.0.226:8020/gykjweb.php?s=news&c=home&m=add&catid=0#0 D:\wwwroot\jinlun_z\dayrui\Core\Controllers\Api\Api.php(104): dr_get_keywords('\xE7\x83\xAD\xE5\x8E\x8B\xE6\x9C\xBA')#1 D:\wwwroot\jinlun_z\dayrui\System\CodeIgniter.php(918): Phpcmf\Controllers\Api\Api->getkeywords()#2 D:\wwwroot\jinlun_z\dayrui\System\CodeIgniter.php(404): CodeIgniter\CodeIgniter->runController(Object(Phpcmf\Controllers\Api\Api))#3 D:\wwwroot\jinlun_z\dayrui\System\CodeIgniter.php(312): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)#4 D:\wwwroot\jinlun_z\dayrui\Fcms\Init.php(379): CodeIgniter\CodeIgniter->run()#5 D:\wwwroot\jinlun_z\index.php(46): require('D:\\wwwroot\\jinl...')#6 {main}
  • #5楼    迅睿框架创始人
    2020-10-30 10:53:34
    Chrome 0
    这个错误是tag目录的插件引起的,可以尝试删掉tag目录的插件文件,或者发帖到插件类去问问插件部门有什么解决方案perweb
    满意答案
  • perweb
    #6楼    perweb
    2020-10-30 10:58:14
    Chrome 0
    好的
  • A87°C
    #7楼    A87°C
    2020-10-30 10:59:46
    Chrome 0
    cms升级了,插件也要升级的,升级关键词库插件
  • 帝云网络
    #8楼    帝云网络
    2020-10-30 11:38:13
    Chrome 0
    自动提取关键词需要在模块里开启吧
  • EFG
    #9楼    EFG
    2020-10-30 19:29:51
    Chrome 0
    /**
     * 请求接口返回内容
     * @param  string $url [请求的URL地址]
     * @param  string $params [请求的参数]
     * @param  int $ipost [是否采用POST形式]
     * @return  string
     */
    function eos_curl($url,$params=false,$ispost=0){
    $httpInfo = array();
    $ch = curl_init();
    curl_setopt( $ch, CURLOPT_HTTP_VERSION , CURL_HTTP_VERSION_1_1 );
    curl_setopt( $ch, CURLOPT_USERAGENT , 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22' );
    curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT , 30 );
    curl_setopt( $ch, CURLOPT_TIMEOUT , 30);
    curl_setopt( $ch, CURLOPT_RETURNTRANSFER , true );
    //return $params;
    if( $ispost )
    {
    curl_setopt( $ch , CURLOPT_POST , true );
    curl_setopt( $ch , CURLOPT_POSTFIELDS , $params );
    curl_setopt( $ch , CURLOPT_URL , $url );
    }
    else
    {
    if($params){
    curl_setopt( $ch , CURLOPT_URL , $url.'?'.$params );
    }else{
    curl_setopt( $ch , CURLOPT_URL , $url);
    }
    }
    $response = curl_exec( $ch );
    if ($response === FALSE) {
    //echo "cURL Error: " . curl_error($ch);
    return false;
    }
    $httpCode = curl_getinfo( $ch , CURLINFO_HTTP_CODE );
    $httpInfo = array_merge( $httpInfo , curl_getinfo( $ch ) );
    curl_close( $ch );
    return $response;
    }
    /**
     * 提取关键字   //替换系统自带的百度关键词接口
     */
    function dr_get_keywords($content, $siteid = SITE_ID){
    if (!$content) {
    return '';
    }
    //api接口
    $url = "http://api.pullword.com/get.php";
    //api参数
    $params = array(
    'source'   => $content, //内容
    'param1'   => '0.8', //0-1 支持小数点,匹配百分比
    'param2'   => '0',  //0|1 是否显示匹配度[默认关闭,不需要]
    );
    $paramstring = http_build_query($params);
    $data = eos_curl($url,$paramstring,0);
    $data = str_replace("\r\n", ",", $data);
    return $data ? str_replace(",,,", "", $data) : "";
    }
    刚刚写了个提取关键词,用的第三方免费API,需要直接拿去,代码放 /config/custom.php 就行了
  • perweb
    #10楼    perweb
    2020-11-19 10:19:08
    Chrome 0
    迅睿框架创始人:谢谢帮助