迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費且不限制商業(yè)使用,是免費開源的產(chǎn)品,以萬端互聯(lián)為設(shè)計理念,支持的微信公眾號、小程序、APP客戶端、移動端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
升級新版后,后臺發(fā)布文章,自動提取關(guān)鍵字失敗。 之前的版本可以
把錯誤日志內(nèi)容發(fā)來看看,方法是:http://help.xunruicms.com/658.html
要看日志啊
我以前升級也是這樣,插件老大說要升級tag插件,或者把tag插件卸載了
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}
這個錯誤是tag目錄的插件引起的,可以嘗試刪掉tag目錄的插件文件,或者發(fā)帖到插件類去問問插件部門有什么解決方案
回復(fù)@perweb
好的
cms升級了,插件也要升級的,升級關(guān)鍵詞庫插件
自動提取關(guān)鍵詞需要在模塊里開啟吧
/** * 請求接口返回內(nèi)容 * @param string $url [請求的URL地址] * @param string $params [請求的參數(shù)] * @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; } /** * 提取關(guān)鍵字 //替換系統(tǒng)自帶的百度關(guān)鍵詞接口 */ function dr_get_keywords($content, $siteid = SITE_ID){ if (!$content) { return ''; } //api接口 $url = "http://api.pullword.com/get.php"; //api參數(shù) $params = array( 'source' => $content, //內(nèi)容 'param1' => '0.8', //0-1 支持小數(shù)點,匹配百分比 'param2' => '0', //0|1 是否顯示匹配度[默認(rèn)關(guān)閉,不需要] ); $paramstring = http_build_query($params); $data = eos_curl($url,$paramstring,0); $data = str_replace("\r\n", ",", $data); return $data ? str_replace(",,,", "", $data) : ""; }
剛剛寫了個提取關(guān)鍵詞,用的第三方免費API,需要直接拿去,代碼放 /config/custom.php 就行了
把錯誤日志內(nèi)容發(fā)來看看,方法是:http://help.xunruicms.com/658.html
要看日志啊
我以前升級也是這樣,插件老大說要升級tag插件,或者把tag插件卸載了
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}
這個錯誤是tag目錄的插件引起的,可以嘗試刪掉tag目錄的插件文件,或者發(fā)帖到插件類去問問插件部門有什么解決方案
回復(fù)@perweb
好的
cms升級了,插件也要升級的,升級關(guān)鍵詞庫插件
自動提取關(guān)鍵詞需要在模塊里開啟吧
剛剛寫了個提取關(guān)鍵詞,用的第三方免費API,需要直接拿去,代碼放 /config/custom.php 就行了