天天躁日日躁狠狠躁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速度快類庫,轉載需保留來源!

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

主站蜘蛛池模板: 国产午夜亚洲精品不卡电影 | 91精品欧美一区二区三区 | 超碰98人人插 | 成人人观看的免费毛片 | 日韩精品一区二区中文 | 内射老妇BBX | 97视频免费在线观看 | 一边捏奶头一边啪高潮会怎么样 | 欧美无码专区 | 久久人妻少妇嫩草AV蜜桃99 | 色噜噜视频影院 | 免费国产在线观看 | 99久久国产露脸精品竹菊传煤 | 99日韩精品 | 国产电影午夜成年免费视频 | 成年女人色毛片免费 | 粉嫩AV国产一区二区福利姬 | 欧美激情性AAAAA片欧美 | 午夜性爽视频男人的天堂在线 | 强奷漂亮女老板在线播放 | 中文字幕亚洲无线码在线 | 欧美成人免费一区二区三区不卡 | 欧美激情视频二区 | 国产高潮久久精品AV无码 | 色综合欧美色综合七久久 | 国产永久免费高清在线观看 | 欧美91精品久久久久网免费 | 三级电影免费看 | 精品久久综合1区2区3区激情 | 国产三级电影网 | 午夜视频在线网站 | 秋霞电影网午夜鲁丝片无码 | 护士的下面又湿又紧10P | 国产99对白在线播放 | 国产精品涩涩涩视频网站 | 99免费在线观看 | 伊人综合在线22 | 四虎国产精品永久一区高清 | 98久久无码一区人妻A片蜜 | 青青青草国产 | 狠狠色香婷婷久久亚洲精品 |