e = xn_seo_pushmap_normalize_filename($conf['sitemap_filename']); foreach ((array) glob(APP_PATH . $filename . '-*.xml') as $chunk_file) { xn_unlink($chunk_file); } $maxsize = max(1, min(50000, intval($conf['sitemap_maxsize']))); $sitemap_url = $conf['base_url'] . $filename . '.xml'; if (count($items) > $maxsize) { $chunks = array_chunk($items, $maxsize); $index_items = array(); foreach ($chunks as $index => $chunk) { $chunk_name = $filename . '-' . ($index + 1); $chunk_url = $conf['base_url'] . $chunk_name . '.xml'; $ok = xn_seo_pushmap_write_file(APP_PATH . $chunk_name . '.xml', xn_seo_pushmap_render_sitemap_xml($chunk)); if (!$ok) { return array('ok' => FALSE, 'message' => '写入分片 Sitemap 失败:' . $chunk_name . '.xml'); } $index_items[] = array('loc' => $chunk_url, 'lastmod' => time()); } $ok = xn_seo_pushmap_write_file(APP_PATH . $filename . '.xml', xn_seo_pushmap_render_sitemap_index_xml($index_items)); if (!$ok) { return array('ok' => FALSE, 'message' => '写入 Sitemap 索引失败'); } } else { $ok = xn_seo_pushmap_write_file(APP_PATH . $filename . '.xml', xn_seo_pushmap_render_sitemap_xml($items)); if (!$ok) { return array('ok' => FALSE, 'message' => '写入 Sitemap 失败'); } } if (!empty($conf['sitemap_sync_robots'])) { xn_seo_pushmap_sync_robots($sitemap_url); } xn_seo_pushmap_set_state_value('last_sitemap_build', time()); xn_seo_pushmap_set_state_value('last_sitemap_url', $sitemap_url); xn_seo_pushmap_add_log('Sitemap', $scene, 1, '地图已生成:' . $sitemap_url, array('count' => count($items))); return array('ok' => TRUE, 'message' => 'Sitemap 生成成功:' . $sitemap_url); } function xn_seo_pushmap_render_sitemap_xml($items) { $xml = array(); $xml[] = ''; $xml[] = ''; foreach ($items as $item) { $xml[] = ' '; $xml[] = ' ' . xn_seo_pushmap_escape($item['loc']) . ''; if (!empty($item['lastmod'])) { $xml[] = ' ' . date('Y-m-d\TH:i:sP', intval($item['lastmod'])) . ''; } $xml[] = ' '; } $xml[] = ''; return implode("\n", $xml); } function xn_seo_pushmap_render_sitemap_index_xml($items) { $xml = array(); $xml[] = ''; $xml[] = ''; foreach ($items as $item) { $xml[] = ' '; $xml[] = ' ' . xn_seo_pushmap_escape($item['loc']) . ''; if (!empty($item['lastmod'])) { $xml[] = ' ' . date('Y-m-d\TH:i:sP', intval($item['lastmod'])) . ''; } $xml[] = ' '; } $xml[] = ''; return implode("\n", $xml); } function xn_seo_pushmap_sync_robots($sitemap_url) { $file = APP_PATH . 'robots.txt'; $line = 'Sitemap: ' . $sitemap_url; $content = is_file($file) ? file_get_contents($file) : ''; if (strpos($content, $line) !== FALSE) { return TRUE; } $content = rtrim($content) . "\n" . $line . "\n"; return xn_seo_pushmap_write_file($file, $content); } function xn_seo_pushmap_push_latest_threads($limit = 20) { $limit = max(1, min(500, intval($limit))); $fids = xn_seo_pushmap_public_fids(); if (empty($fids)) { return array('ok' => FALSE, 'message' => '没有可公开推送的版块'); } $threadlist = db_find('thread', array('fid' => $fids), array('tid' => -1), 1, $limit); if (empty($threadlist)) { return array('ok' => FALSE, 'message' => '没有可推送的主题'); } $urls = array(); foreach ($threadlist as $thread) { $urls[] = xn_seo_pushmap_thread_url($thread['tid']); } return xn_seo_pushmap_submit_urls($urls, 'update', 'manual_latest'); } function xn_seo_pushmap_push_custom_urls($text) { $conf = xn_seo_pushmap_get_conf(); $origin = xn_seo_pushmap_origin_from_base_url($conf['base_url']); $urls = array(); foreach (preg_split('#\r\n|\r|\n#', trim($text)) as $line) { $line = trim($line); if ($line === '') continue; if (preg_match('#^https?://#i', $line)) { $urls[] = $line; } elseif (substr($line, 0, 1) == '/') { $urls[] = $origin . $line; } else { $urls[] = xn_seo_pushmap_join_url($conf['base_url'], $line); } } return xn_seo_pushmap_submit_urls($urls, 'update', 'manual_custom'); } function xn_seo_pushmap_build_setting_input($conf) { return array( 'base_url' => form_text('base_url', xn_seo_pushmap_form_value($conf['base_url']), '100%'), 'timeout' => form_text('timeout', intval($conf['timeout'])), 'log_limit' => form_text('log_limit', intval($conf['log_limit'])), 'auto_create' => form_radio_yes_no('auto_create', intval($conf['auto_create'])), 'auto_update' => form_radio_yes_no('auto_update', intval($conf['auto_update'])), 'auto_delete' => form_radio_yes_no('auto_delete', intval($conf['auto_delete'])), 'baidu_enable' => form_radio_yes_no('baidu_enable', intval($conf['baidu_enable'])), 'baidu_api' => form_text('baidu_api', xn_seo_pushmap_form_value($conf['baidu_api']), '100%'), 'indexnow_enable' => form_radio_yes_no('indexnow_enable', intval($conf['indexnow_enable'])), 'indexnow_endpoint' => form_text('indexnow_endpoint', xn_seo_pushmap_form_value($conf['indexnow_endpoint']), '100%'), 'indexnow_host' => form_text('indexnow_host', xn_seo_pushmap_form_value($conf['indexnow_host']), '100%'), 'indexnow_key' => form_text('indexnow_key', xn_seo_pushmap_form_value($conf['indexnow_key']), '100%'), 'google_enable' => form_radio_yes_no('google_enable', intval($conf['google_enable'])), 'google_mode' => form_radio('google_mode', array('indexing_api' => 'Indexing API'), $conf['google_mode']), 'google_service_account_json' => form_textarea('google_service_account_json', xn_seo_pushmap_form_value($conf['google_service_account_json']), '100%', 240), 'sitemap_enable' => form_radio_yes_no('sitemap_enable', intval($conf['sitemap_enable'])), 'sitemap_auto' => form_radio_yes_no('sitemap_auto', intval($conf['sitemap_auto'])), 'sitemap_filename' => form_text('sitemap_filename', xn_seo_pushmap_form_value($conf['sitemap_filename']), '100%'), 'sitemap_maxsize' => form_text('sitemap_maxsize', intval($conf['sitemap_maxsize'])), 'sitemap_include_home' => form_radio_yes_no('sitemap_include_home', intval($conf['sitemap_include_home'])), 'sitemap_include_forum' => form_radio_yes_no('sitemap_include_forum', intval($conf['sitemap_include_forum'])), 'sitemap_include_thread' => form_radio_yes_no('sitemap_include_thread', intval($conf['sitemap_include_thread'])), 'sitemap_sync_robots' => form_radio_yes_no('sitemap_sync_robots', intval($conf['sitemap_sync_robots'])), ); } ?>
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 189
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 189, ini_set(session.name , bbs_sid)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 191
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 191, ini_set(session.use_cookies , On)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 192
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 192, ini_set(session.use_only_cookies , On)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 193
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 193, ini_set(session.cookie_domain , )
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 194
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 194, ini_set(session.cookie_path , )
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 195
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 195, ini_set(session.cookie_secure , Off)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 196
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 196, ini_set(session.cookie_lifetime , 8640000)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 197
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 197, ini_set(session.cookie_httponly , On)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 199
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 199, ini_set(session.gc_maxlifetime , 3600)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 200
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 200, ini_set(session.gc_probability , 1)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 201
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 201, ini_set(session.gc_divisor , 500)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: session_set_save_handler(): Cannot change save handler when headers already sent, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 203
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 203, session_set_save_handler(sess_open , sess_close , sess_read , sess_write , sess_destroy , sess_gc)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: session_start(): Cannot start session when headers already sent, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 210
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 210, session_start()
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
部含着一相关主题 - 1篇 - 性息网-全国性息-免费楼凤论坛
首页 发现 发布 消息 我的
部含着一
1 篇主题

关键词 聚合 URL:tag-%E9%83%A8%E5%90%AB%E7%9D%80%E4%B8%80-1.htm