📄 conf.php
字号:
<?/******************************************** Sphider Version 1.2* This program is licensed under the GNU GPL.* By Ando Saabas ando(a t)cs.ioc.ee********************************************/$includes = array('./languages', 'languages', '../languages');if( !in_array($language_dir, $includes) && $language_dir != "") { die("Illegal include."); } else if ($language_dir != "" ){ include "$language_dir/cn-language.php"; //The language file} // Number of words a webpage must have to be indexed$min_words_per_page = 10;// Words shorter than this will not be indexed$min_word_length = 3;// Keyword weight depending on the number of times it appears in a page is capped at $word_upper_bound$word_upper_bound = 100; $bound_search_result = 0; //can speed up searches on large database (should be 0)// Number of query results shown per page$results_per_page = 10;// The length of the description string queried when displaying search results. // If set to 0 (default), makes a query for the whole page text,// otherwise queries "substring(fulltext, 1, $length_of_link_desc))"// Can significantly speed up searching on slower machines, if set to a lower value (eg 250 or 1000).$length_of_link_desc = 0;// Number of links shown to "next" pages$links_to_next = 9;// Show meta description in results page if it exists, otherwise show// an extract from the page text.$show_meta_description = 1;// Query scores are not shown if set to 0$show_query_scores = 1;// if this value is set to 1, word in domain name and url path are also indexed,// so that for example the index of www.php.net returns a positive answer to query "php" even // if the word is not included in the page itself. $index_host = 0;// Use advanced search form: radio buttons for AND, OR and Phrase search and// "results per page" selector$advanced_search = 0;// if this value is set to 1, keywords in a meta tag are also indexed$index_meta_keywords = 1;//Length of page description given in results page$desc_length = 250;//The number of colums the category list should have$cat_columns = 2;//If this is set to 1, numbers are also indexed and searchable$index_numbers = 1;//Set the user agent string$user_agent = "Sphider";//function to calculate the weight of pagesfunction calc_weight ($words_in_page, $word_in_title, $word_in_domain, $word_in_path, $path_depth, $meta_keyword) {//Relative weight of a word in the title of a webpage$title_weight = 20;//Relative weight of a word in the domain name$domain_weight = 60; //Relative weight of a word in the domain name$path_weight = 10;//Relative weight of a word in meta_keywords$meta_weight = 5;//weight function $weight = ($words_in_page + $word_in_title * $title_weight + $word_in_domain * $domain_weight + $word_in_path * $path_weight + $meta_keyword * $meta_weight) *10 / (0.8 +0.2*$path_depth); return $weight;}//index pdf files$index_pdf = 0;//index pdf files$index_doc = 0;//temporary directory, this should be readable and writable$tmp_dir='tmp/';//path to pdf converter (including the file name itself)$pdftotext_path = 'pdftotext.exe';//path to doc converter (including the file name itself)$catdoc_path = 'catdoc.exe';?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -