一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

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

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

主站蜘蛛池模板: 国产成人综合精品 | 国产激情在线观看完整流畅 | 美女网站视频色 | 欧美在线精品永久免费播放 | 国产xxxxx在线播放 | 91中文字幕在线播放 | 精品视频一区二区三区在线观看 | 韩国午夜理伦三级2020宅男 | 99国产成人精品2021 | 精品久久久久国产 | 四虎国产永久免费久久 | 国产精品午夜在线观看 | 六月婷婷综合激情 | 九草在线播放 | 欧美成人亚洲国产精品 | 日本精品一区二区在线播放 | 中文字幕2区 | 狠狠做深爱婷婷久久一区 | www爱射网站avcom | 日本精品久久久久久久 | 涩涩爱网站 | 国产普通话一二三道 | 九九九在线视频 | 亚洲激情99| 九九国产视频 | 国产免费69成人精品视频 | 美女一丝不佳一级毛片大屁股 | 日韩精品中文字幕一区二区三区 | 天天干免费视频 | 国色天香精品亚洲精品 | 亚洲一区2区三区4区5区 | 欧美精品片在线观看网站 | 国产精品高清视亚洲一区二区 | a级黄色网址| 香蕉免费一区二区三区在线观看 | 亚洲卡5卡6卡7卡2021入口 | 美女视频黄视大全视频免费的 | 成人综合网站 | 久久手机免费视频 | 在线精品国内视频秒播 | 在线视频 二区 |