天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

用PHP實現的生成靜態HTML速度快類庫

復制代碼 代碼如下:
<?php 
/////////////////////////////////////////////////////////////////////////////// 
// 
// 張樹林 - 慧佳工作室 
// 
// Module Name:     woods-bhtml.php 
// Abstract:        生成靜態HTML處理程序尾底 
// Version:         2.0 
// Date                                1006-11-25 
// Author:          woods?zhang 
// Website:         http://www.hoojar.com/ 
// Email:           [email protected] 
// MSN:             [email protected] 
// Copyright 1001-1006, Hoojar studio All Rights Reserved 
// 
// 版權 1001-1006,慧佳工作室所有版權保護 

//The software for free software, allowing use, copy, 
//modify and distribute the software and files. Any 
//use of this software must place a copy of all the 
//above copyright notice. By the software Huijia studio 
//maintenance, if you have any queries please contact us. 
//Thank you. 
// 
//此軟件為自由軟件,允許使用、拷貝、修改、分發本軟件及其文檔。 
//任何使用此軟件的地方都得出現以上版權通告所有副本。此軟件由 
//慧佳工作室維護,如果您有什么疑問請與我們聯系。謝謝使用。 
// 
/////////////////////////////////////////////////////////////////////////////// 
//此文件只能加載在程序的最尾 
/*________________生成HTML文件______________________beign________________________________*/ 
if ($make_html) 

        $buffer = ob_get_flush(); 
        if ($go_html)//是否直接轉到HTML文件顯示還是php讀得內容輸出(0:php讀內容輸出1:直接轉) 
        { 
                /*__________處理因生成了HTML文件而產生的種徑問題____________________begin_______________*/ 
                $search = array( 
                        "/(src=|action=|href=|ajaxRead/()/"/ie", 
                        "http://./././e", 
                        "http://.///./e", 
                        "http://././/http://///ies", 
                        "http://././/#/", 
                        "http://'/./'/e", 
                        "http://././/Javascript:/ies"); 

                $replace = array( 
                        "'//1/"../'", 
                        "'..'", 
                        "'.'", 
                        "'http://'", 
                        "#", 
                        "'/'../''", 
                        "'Javascript:'"); 
                $buffer = preg_replace($search, $replace, $buffer); 
                /*__________處理因生成了HTML文件而產生的種徑問題____________________end_______________*/ 
        } 

        $fp = fopen(HTML_FILE, "w"); 
        if ($fp) 
        { 
                fwrite($fp, $buffer); 
                fclose($fp); 
        } 

/*________________生成HTML文件______________________beign________________________________*/ 
?> 

<?php 
/////////////////////////////////////////////////////////////////////////////// 
// 
// 張樹林 - 慧佳工作室 
// 
// Module Name:     woods-thtml.php 
// Abstract:        生成靜態HTML處理程序頭 
// Version:         2.0 
// Date                                1006-11-25 
// Author:          woods?zhang 
// Website:         http://www.hoojar.com/ 
// Email:           [email protected] 
// MSN:             [email protected] 
// Copyright 1001-1006, Hoojar studio All Rights Reserved 
// 
// 版權 1001-1006,慧佳工作室所有版權保護 

//The software for free software, allowing use, copy, 
//modify and distribute the software and files. Any 
//use of this software must place a copy of all the 
//above copyright notice. By the software Huijia studio 
//maintenance, if you have any queries please contact us. 
//Thank you. 
// 
//此軟件為自由軟件,允許使用、拷貝、修改、分發本軟件及其文檔。 
//任何使用此軟件的地方都得出現以上版權通告所有副本。此軟件由 
//慧佳工作室維護,如果您有什么疑問請與我們聯系。謝謝使用。 
// 
/////////////////////////////////////////////////////////////////////////////// 
//此文件只能加載在程序的開頭 
ob_start(); 
/*___________判斷是否已生成了HTML文件,若生成了則跳轉到HTML頁面___________begin__________*/ 
$qstring = isset($_SERVER["QUERY_STRING"]) ? $_SERVER["QUERY_STRING"] : ""; 
if ($qstring)//程序加了GET請求的處理 

        $qstring = str_replace("=", "", $qstring); 
        define("HTML_FILE", "./h/{$efilename}-{$qstring}.html"); 

else 

        define("HTML_FILE", "./h/{$efilename}.html"); 

if (file_exists(HTML_FILE)) 

        $lcft = filemtime(HTML_FILE);//last create file time 
        if (($lcft + 3600) > time())//判斷上次生成HTML文件是否以過去1時間,若沒有才直接輸出文件內容 
        { 
                if ($show_html)//是否以HTML靜態頁面展示(0不以HTML展顯1以html展顯) 
                { 
                        if ($go_html)//是否直接轉到HTML文件顯示還是php讀得內容輸出(0:php讀內容輸出1:直接轉) 
                        { 
                                header("Location: " . HTML_FILE);//直接轉 
                        } 
                        else 
                        { 
                                echo(file_get_contents(HTML_FILE));//讀出展顯 
                        } 
                        exit(0); 
                } 
        } 

/*___________判斷是否已生成了HTML文件,若生成了則跳轉到HTML頁面___________end__________*/ 
?> 

<?php 
/////////////////////////////////////////////////////////////////////////////// 
// 
// 張樹林 - 慧佳工作室 
// 
// Module Name:     index.php 
// Abstract:        首頁信息 
// Version:         1.0 
// Date                                2006-11-7 
// Author:          woods?zhang 
// Website:         http://www.hoojar.com/ 
// Cemail:           [email protected] 
// MSN:             [email protected] 
// Copyright 2001-2006, Hoojar studio All Rights Reserved 
// 
// 版權 2001-2006,慧佳工作室所有版權保護 

//The software for free software, allowing use, copy, 
//modify and distribute the software and files. Any 
//use of this software must place a copy of all the 
//above copyright notice. By the software Huijia studio 
//maintenance, if you have any queries please contact us. 
//Thank you. 
// 
//此軟件為自由軟件,允許使用、拷貝、修改、分發本軟件及其文檔。 
//任何使用此軟件的地方都得出現以上版權通告所有副本。此軟件由 
//慧佳工作室維護,如果您有什么疑問請與我們聯系。謝謝使用。 
// 
/////////////////////////////////////////////////////////////////////////////// 
require("woods-thtml.php");//生成HTML處理頭 
//if (count($_GET) < 1 && count($_POST) < 1){require("woods-thtml.php");}//生成HTML處理頭 

require("{$exec_file}");//注冊語言定義文件 
foreach ($lang as $key => $value) 

        $atpl[strtoupper($key) ."_LANG"] = $value; 

/*____________________________________列表常識向上走的項__________________end_____________________*/ 
include("woods-templates.php"); 
$tpl = new WoodsTpl("./templates/"); 
$tpl->require_tpl("header.html"); 
$tpl->set_file(); 
$tpl->block("EBCORP", $scorp); 
$tpl->block("NEWS", $news); 

$tpl->block("PRODUCT", $product); 
$tpl->block("EBPNAME_MSG", $spname); 

$tpl->block("LORE", $lore); 
$tpl->require_tpl("footer.html"); 
$tpl->parse($atpl, true); 
$tpl = NULL; 
/*________________模板操作_________________________end___________________________________*/ 
require("woods-bhtml.php");//生成HTML處理尾 
?>

php技術用PHP實現的生成靜態HTML速度快類庫,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 翁公与小莹在客厅激情 | 抽插H浊水H嫩B父皇 虫族bl文全肉高h | 伦理片天堂eeuss影院 | 国产av在在免费线观看美女 | 麻豆沈芯语 | 99视频免费观看 | 日产日韩亚洲欧美综合搜索 | 日本高清不卡码无码v亚洲 日本福利片午夜免费观着 日本粉嫩学生毛绒绒 | 久久精品熟女亚洲AV国产 | 伊人久久精品AV无码一区 | 日本视频一区二区免费观看 | 久久国产精品自线拍免费 | 女厕所边摸边吃奶边做爽视频 | FREECHINESE东北女人真爽 free18sex性自拍裸舞 | 最新果冻传媒在线观看免费版 | 快播av网址 | 国产亚洲精品视频亚洲香蕉视 | 中文字幕绝色少妇性 | 影视先锋男人无码在线 | 国产人妻人伦精品久久久 | 99国产亚洲精品无码成人 | 欧美成人无码A区在线观看免费 | 视频成人永久免费看 | a级男女性高爱潮高清试看 A级毛片无码久久精品免费 | 国产欧美精品一区二区三区-老狼 | 24小时日本在线观看片 | 国精产品一区二区三区四区糖心 | 亚洲欧美中文日韩视频 | 不戴套挺进人妻怀孕 | 中文字幕亚洲第一页 | 国产伦子沙发午休系列资源曝光 | 最新亚洲一区二区三区四区 | 爽死你个放荡粗暴小淫货漫画 | 亚洲青青青网伊人精品 | 欧美日韩第一区 | 九九热视频这里只有精 | 伊人久久大香线蕉综合电影网 | 闺蜜扒开我尿口使劲揉 | 亚洲日韩视频免费观看 | 亚洲精品成人a | 久久五月综合婷婷中文云霸高清 |