天天躁日日躁狠狠躁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:           hoojar@53.com 
// MSN:             hoojar@hotmail.com 
// 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:           hoojar@53.com 
// MSN:             hoojar@hotmail.com 
// 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:           hoojar@163.com 
// MSN:             hoojar@hotmail.com 
// 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速度快類庫,轉載需保留來源!

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

主站蜘蛛池模板: 国产亚洲精品久久久久久国模美 | 漂亮的保姆6在线观看中文 漂亮的保姆5电影免费观看完整版中文 | 理论片午午伦夜理片I | 18禁黄无遮挡禁游戏在线下载 | 春水福利app导航 | 四川少妇大战4黑人 | 成年人免费在线视频观看 | 亚洲精品国产字幕久久vr | 亚洲日本香蕉视频观看视频 | 日本视频一区二区免费观看 | 男人的天堂色偷偷 | 欧美Av无码高清在线 | 成年人免费观看的视频 | WWW久久只有这里有精品 | 亚洲精品美女久久777777 | 口工漫画r18全彩啪啪 | 亚洲中文字幕无码一去台湾 | 久久久久久久久人体 | 伊人久久大香线蕉综合影 | 亚洲视频国产 | 国产3级在线观看 | 边做边爱免费视频 | 国产人成高清在线视频99 | 刮伦人妇A极一片 | 乌克兰粉嫩摘花第一次 | 国产精品第十页 | 吃奶啃奶玩乳漫画 | 日本精品久久久久中文字幕 | 99久久婷婷国产综合精品青草 | 1级午夜影院费免区 | 麻豆高清区在线 | 久久AV国产麻豆HD真实 | 20岁中国男同志china1069 20岁αsrian男同志免费 | 韩国伦理电影在线神马网 | 久久婷婷色一区二区三区 | 免费果冻传媒2021视频 | 天天操天天干天天爽 | 午夜天堂一区人妻 | 日本最新在线不卡免费视频 | 秋霞伦理电影在2017韩国在线伦 | 中文字幕按摩 |