AI智能回复搜索中,请稍后...
file: UPLOAD\app\question\main.php
// 相关的问题 $question_related_list = $this->model('question')->get_related_question_list($question_info['question_id'], $question_info['question_content']);file: \UPLOAD\models\question.php
function get_related_question_list($question_id, $question_content, $limit = 10) { if ($question_id) { $question_related_list = AWS_APP::cache()->get('question_related_list_' . $question_id . '_' . $limit); if (is_array($question_related_list)) { return $question_related_list; } } if ($question_keywords = $this->model('system')->analysis_keyword($question_content)) { if (sizeof($question_keywords) <= 1) { return false; } if ($question_list = $this->model('search')->search_questions($question_keywords, null, ($limit + 1))) { foreach ($question_list as $key => $val) { if ($val['question_id'] == $question_id) { unset($question_list[$key]); } else { if (! isset($question_lnk[$val['question_id']])) { $question_lnk[$val['question_id']] = $val['question_content']; $question_info[$val['question_id']] = $val; } } } } } $question_lnk_list = array(); if ($question_lnk) { foreach ($question_lnk as $key => $question_content) { $question_lnk_list[] = array( 'question_id' => $key, 'question_content' => $question_content, 'answer_count' => $question_info[$key]['answer_count'] ); } } if (sizeof($question_lnk) > $limit) { array_pop($question_lnk); } if ($question_id) { AWS_APP::cache()->set('question_related_list_' . $question_id . '_' . $limit, $question_related_list, get_setting('cache_level_low')); } return $question_lnk_list; }所有代码在这了。
这家伙很懒,还没有设置简介