spiders.txt 有何用?删掉后出问题了!
我在认为无用的情况下删除了这个东西,后来网站出现提示:
Warning: file(includes/spiders.txt) [function.file]: failed to open stream: No such file or directory in /home4/hahau/public_html/includes/init_includes/init_sessions.php on line 77
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home4/hahau/public_html/includes/init_includes/init_sessions.php:77) in /home4/hahau/public_html/includes/functions/sessions.php on line 114
Warning: Cannot modify header information - headers already sent by (output started at /home4/hahau/public_html/includes/init_includes/init_sessions.php:77) in /home4/hahau/public_html/includes/init_includes/init_templates.php on line 78
我看了这个init_session.php:- if (isset($_COOKIE['cookie_test'])) {
- zen_session_start();
- $session_started = true;
- }
- } elseif (SESSION_BLOCK_SPIDERS == 'True') {
- $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
- $spider_flag = false;
- if (zen_not_null($user_agent)) {
- $spiders = file(DIR_WS_INCLUDES . 'spiders.txt'); // 这个文件在这里调用,到底什么意思,往指教。
- for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {
- if (zen_not_null($spiders[$i]) && substr($spiders[$i], 0, 4) != '$Id:') {
- if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
- $spider_flag = true;
- break;
- }
- }
- }
- }
- if ($spider_flag == false) {
- zen_session_start();
- $session_started = true;
- } else {
- if (isset($_GET['zenid']) && $_GET['zenid'] != '') {
- $tmp = (isset($_GET['main_page']) && $_GET['main_page'] != '') ? $_GET['main_page'] : FILENAME_DEFAULT;
- @header("HTTP/1.1 301 Moved Permanently");
- @zen_redirect(@zen_href_link($tmp, @zen_get_all_get_params(array('zenid')), $request_type, FALSE));
- unset($tmp);
- die();
- }
- }
- } else {
- zen_session_start();
- $session_started = true;
- }
- unset($spiders);
复制代码 什么意思,我该如何恢复?谢谢指教。 |