📄 config.php
字号:
<?php/*----------------------------------------------------------------------------------PhpDig Version 1.8.x - See the config file for the full version number.This program is provided WITHOUT warranty under the GNU/GPL license.See the LICENSE file for more information about the GNU/GPL license.Contributors are listed in the CREDITS and CHANGELOG files in this package.Developer from inception to and including PhpDig v.1.6.2: Antoine BajoletDeveloper from PhpDig v.1.6.3 to and including current version: CharterCopyright (C) 2001 - 2003, Antoine Bajolet, http://www.toiletoine.net/Copyright (C) 2003 - current, Charter, http://www.phpdig.net/Contributors hold Copyright (C) to their code submissions.Do NOT edit or remove this copyright or licence information upon redistribution.If you modify code and redistribute, you may ADD your copyright to this notice.----------------------------------------------------------------------------------*///---------DEFAULT VALUES// error_reporting(E_ALL);// @ini_set('error_reporting',E_ALL);//-------------CONFIGURATION FILE-------//-------------PHP DIG------------------// NOTE: If you want a different path, you need to add that path (relative path up to the // admin directory: ../dir or full path up to the admin directory: /full/path/to/dir) in // the first if statement in this config.php file - for example:// && ($relative_script_path != "../dir") // relative path// && ($relative_script_path != "/full/path/to/dir") // full path// You may also need to set $relative_script_path to this path in search.php, clickstats.php, // and function_phpdig_form.php depending on what files you are calling from where// NOTE: double dot means go back one and single dot means stay in same directory// NOTE: the path should be UP TO but NOT INCLUDING the admin directory - NO ending slash/***** Example* PhpDig installed at: http://www.domain.com/phpdig/* Want search page at: http://www.domain.com/search.php* Copy http://www.domain.com/phpdig/search.php to http://www.domain.com/search.php* Copy http://www.domain.com/phpdig/clickstats.php to http://www.domain.com/clickstats.php* Set $relative_script_path = './phpdig'; in search.php, clickstats.php, and function_phpdig_form.php* Add ($relative_script_path != "./phpdig") && to if statement*****/define('ABSOLUTE_SCRIPT_PATH','/full/path/to/dir'); // full path up to but not including admin dir, no end slashif ((!isset($relative_script_path)) || (($relative_script_path != ".") && ($relative_script_path != "..") && ($relative_script_path != ABSOLUTE_SCRIPT_PATH))) { // echo "\n\nPath $relative_script_path not recognized!\n\n"; exit();}// NOTE: If you receive an "undefined index" message that means that your server is not recognizing // one or some of the $_SERVER variables so check your PHP info and set the $_SERVER variables to // those recognized by your server: See http://www.php.net/reserved.variables for a list// If using RSS (config vars below) there are $_SERVER variables in the custom_search_page.php file tooif ((isset($_SERVER['SCRIPT_FILENAME'])) && (eregi("config.php",$_SERVER['SCRIPT_FILENAME']))) { exit();}if ((isset($_SERVER['SCRIPT_URI'])) && (eregi("config.php",$_SERVER['SCRIPT_URI']))) { exit();}if ((isset($_SERVER['SCRIPT_URL'])) && (eregi("config.php",$_SERVER['SCRIPT_URL']))) { exit();}if ((isset($_SERVER['REQUEST_URI'])) && (eregi("config.php",$_SERVER['REQUEST_URI']))) { exit();}if ((isset($_SERVER['SCRIPT_NAME'])) && (eregi("config.php",$_SERVER['SCRIPT_NAME']))) { exit();}if ((isset($_SERVER['PATH_TRANSLATED'])) && (eregi("config.php",$_SERVER['PATH_TRANSLATED']))) { exit();}if ((isset(api_get_self())) && (eregi("config.php",api_get_self()))) { exit();}define('PHPDIG_VERSION','1.8.6');$phpdig_language = "en"; // ca, cs, da, de, en, es, fr, gr, it, nl, no, ptif (!isset($phpdig_language)) { $phpdig_language = "en"; }define('PHPDIG_ADM_AUTH','1'); //Activates/deactivates the authentification functionsdefine('PHPDIG_ADM_USER','admin'); //Usernamedefine('PHPDIG_ADM_PASS','secret');// template file and style - checks to see that template is set to a valid valueif (isset($_REQUEST['template_demo'])) { $template_demo = $_REQUEST['template_demo']; }$templates_array = array('black.html','bluegrey.html','corporate.html','green.html','grey.html','lightgreen.html','linear.html','newspaper.html','phpdig.html','simple.html','terminal.html','yellow.html','gaagle.html');if(isset($template_demo) && in_array($template_demo, $templates_array)) { $template = "$relative_script_path/templates/$template_demo";} else { $template = "$relative_script_path/templates/phpdig.html";}$template = "array"; // RH: overrides the above// template file and style - alternatively force the template value// $template = "$relative_script_path/templates/phpdig.html";// if using array, set $template = "array";// if using classic, set $template = "classic";// now set $template_demo to clean $template filename or empty stringif (($template != "array") && ($template != "classic")) { $template_demo = substr($template,strrpos($template,"/")+1); // get filename.ext from $template variable} else { $template_demo = "";}define('HIGHLIGHT_BACKGROUND','#FFBB00'); //Highlighting background color //Only for classic modedefine('HIGHLIGHT_COLOR','#000000'); //Highlighting text color //Only for classic modedefine('LINK_TARGET','_blank'); //Target for result linksdefine('WEIGHT_IMGSRC','./tpl_img/weight.gif'); //Baragraph image pathdefine('WEIGHT_HEIGHT','5'); //Baragraph heightdefine('WEIGHT_WIDTH','50'); //Max baragraph widthdefine('SEARCH_PAGE','search.php'); //The name of the search pagedefine('DISPLAY_DROPDOWN',true); //Display dropdown on search pagedefine('DROPDOWN_URLS',true); //Always URLs in dropdown: DISPLAY_DROPDOWN needs to be truedefine('SUMMARY_DISPLAY_LENGTH',700); // RH: was 150 //Max chars displayed in summarydefine('SNIPPET_DISPLAY_LENGTH',150); //Max chars displayed in each snippetdefine('DISPLAY_SNIPPETS',true); //Display text snippetsdefine('DISPLAY_SNIPPETS_NUM',4); //Max snippets to displaydefine('DISPLAY_SUMMARY',false); //Display descriptiondefine('PHPDIG_DATE_FORMAT','\1-\2-\3'); // Date format for last update // \1 is year, \2 month and \3 day // if using rss, use date format \1-\2-\3define("END_OF_LINE_MARKER","\r\n"); // End of line marker - keep double quotesdefine('SEARCH_BOX_SIZE',15); // Search box sizedefine('SEARCH_BOX_MAXLENGTH',50); // Search box maxlengthdefine('PHPDIG_ENCODING','iso-8859-1'); // encoding for interface, search and indexing. // iso-8859-1, iso-8859-2, iso-8859-7, tis-620, // and windows-1251 supported in this version.// replace/edit phpdig_string_subst/phpdig_words_chars for encodings as needed// note: you may need to alter table keywords modify keyword varchar(64) binary; for certain encodings$phpdig_string_subst['iso-8859-1'] = 'A:懒旅呐,a:噌忏溴,O:矣哉重,o:蝮趱鲽,E:壬仕,e:栝觌,C:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -