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

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

主站蜘蛛池模板: 伊人网站在线 | 99综合之综合久久伊人 | 亚洲 无码 制服 日韩 | 免费特黄一区二区三区视频一 | 国产99精品视频一区二区三区 | 欧美精品一区二区蜜臀亚洲 | 国产AV在线传媒麻豆 | 亚洲国产日韩欧美视频二区 | 51精品少妇人妻AV一区二区 | 黄色a三级免费看 | 欧美牲交视频免费观看K8经典 | 精品国产成a人在线观看 | 亚洲精品久久YY5099 | 久久精品熟女亚洲AV国产 | 色吧.com| 少妇高潮惨叫久久久久久欧美 | 亚洲欧美综合中文 | 亚洲精品国产AV成人毛片 | 久久伊人影视 | 116美女写真午夜电影z | 午夜伦理在线观看 | 中文无码乱人伦中文视频播放 | 神马电影院午 夜理论 | 亚洲免费观看视频 | 久久亚洲精选 | 亚洲在线中文无码首页 | 亚洲欧美一区二区三区四区 | 欧洲内射VIDEOXXX3D | 国产野外无码理论片在线观看 | 91原创在线 | 东北足疗店妓女在线观看 | 欧美性最猛xxxx在线观看视频 | 1788福利视频在视频线 | 亚洲 日韩 国产 中文视频 | 9LPORM原创自拍达人 | 亚洲 欧美 国产 综合久久 | 在线视频一区二区三区在线播放 | 亚洲狠狠97婷婷综合久久久久 | 在线播放毛片 | 俄罗斯女肥臀大屁BBW | jizzjizz丝袜 |