Пример #1
0
function reAllCache()
{
    global $arrSideModule;
    categories_recount();
    categories_recache();
    calendar_recache();
    statistics_recache();
    hottags_recache();
    archives_recache();
    links_recache();
    filters_recache();
    keywords_recache();
    recentLogs_recache();
    recentComments_recache();
    recentGbooks_recache();
    logsTitle_recache();
    modulesSetting_recache();
    download_recache();
    attachments_recache();
    members_recache();
    skinlist_recache();
    online_recache();
    logs_sidebar_recache($arrSideModule);
}
Пример #2
0
"> 
			<title><?php 
                echo $strDownloadNoValid;
                ?>
</title>
			</head>
			<?php 
                echo "<p align=center><font color=\"red\" size=\"5\"><b>{$strDownloadNoValidInfo}</b></font></p>";
                exit;
            }
        }
        //更新下载量
        $modify_sql = "UPDATE " . $DBPrefix . "attachments set downloads=downloads+1 WHERE id='{$id}'";
        $DMC->query($modify_sql);
        //更新附件Cache
        download_recache();
        attachments_recache();
        //网址直接输出地址
        if (strpos($file_path, "://") > 0) {
            ob_end_clean();
            header("location:{$file_path}");
            exit;
        } else {
            $file_path = "attachments/" . $file_path;
            //读取文件内容
            if (file_exists($file_path)) {
                //读取内容
                $temp_buffer = readfromfile($file_path);
                ob_end_clean();
                header('Cache-control: max-age=31536000');
                header('Expires: ' . gmdate('D, d M Y H:i:s', $filetime + 31536000) . ' GMT');