osdate_check_cache.php
来自「太烦了」· PHP 代码 · 共 38 行
PHP
38 行
<?php
/* This is the program which checks for cache and takes necessary action.
* Vijay Nair
*
* This works only for the index.php
*
*/
/* Now we are ready to process */
include_once(FULL_PATH.'includes/internal/osdate_cache.php');
if ( $_SERVER['SCRIPT_NAME'] == DOC_ROOT.'index.php' ) {
if ($_SERVER['QUERY_STRING'] == '') {
/* This is the initial index page */
$cached_data = checkCache('page_' . $_SERVER['REQUEST_URI'] );
if (!$cached_data) return true;
echo($cached_data);
exit;
} elseif ( $_SERVER['QUERY_STRING']!= '' ) {
$qrystr = $_SERVER['QUERY_STRING'];
if (substr_count($qrystr,'page=') > 0) {
$cached_data = checkCache('page_' . $_SERVER['REQUEST_URI'] );
if (!$cached_data) return true;
echo($cached_data);
exit;
}
}
} elseif ($_SERVER['SCRIPT_NAME'] == DOC_ROOT.'showprofile.php' ) {
/* showprofile */
$cached_data = checkCache('page_' . $_SERVER['REQUEST_URI']);
if (!$cached_data) return true;
echo($cached_data);
exit;
}
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?