Home > Backend Development > PHP Tutorial > http://www.google.com.hk/ A fast class library for generating static HTML using PHP

http://www.google.com.hk/ A fast class library for generating static HTML using PHP

WBOY
Release: 2016-07-29 08:36:54
Original
2245 people have browsed it

Copy the code The code is as follows:


///////////////////////////////////////////// /////////////////////////////////////
//
// Zhang Shulin - Huijia Studio
/ /
// Module Name: woods-bhtml.php
// Abstract: Generate static HTML handler tail
// 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
//
/ / Copyright 1001-1006, all copyright protection by Huijia Studio
//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.
//
//This software is free software and is allowed to be used. Copy, modify, and distribute this software and its documentation.
//All copies of the above copyright notice must appear wherever this software is used. This software is maintained by
//Huijia Studio. If you have any questions, please contact us. Thank you for using it.
//
///////////////////////////////////////////////// ///////////////////////////////////
//This file can only be loaded at the end of the program
/*_______________ _Generate HTML file_____________________________beign____________________________*/
if ($make_html)
{
                                                                                                                                                to Content output 1: Direct transfer)
                                                                                                                                                                                    " "/(src=|action=|href=|ajaxRead ()"/ie",
"/.../e",
"/././e",
"/../http:///ies" ,
                                                        "/../#/" ,
                 "/'.'/e",                                                                                 "'\1"../'",
"'..'",
                                                                             "''..''",
"'javascript:'");
$buffer = preg_replace($search, $replace, $buffer); 
                /*__________处理因生成了HTML文件而产生的种径问题____________________end_______________*/ 
        } 
        $fp = fopen(HTML_FILE, "w"); 
        if ($fp) 
{
                                                                                                                                                                                        
/*______________Generate HTML file_______________beign____________________________*/
?>
///////////////////////////// ///////////////////////////////////////////////////// /
//
// Zhang Shulin - Huijia Studio
//
// Module Name: woods-thtml.php
// Abstract: Generate static HTML handler header
// Version: 2.0
// D ate 1006- 11-25
//Author: woods·zhang
// Website: http://www.hoojar.com/
// Email: hoojar@53.com
// MSN: hoojar@hot mail.com
// Copyright 1001-1006, Hoojar studio All Rights Reserved
//
//Copyright 1001-1006, Hoojar studio All rights reserved
//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.
//
//This software is free software, and you are allowed to use, copy, modify, and distribute this software and its documentation.
//All copies of the above copyright notice must appear wherever this software is used. This software is maintained by
//Huijia Studio. If you have any questions, please contact us. Thank you for using it.
//
///////////////////////////////////////////////// ///////////////////////////////////
//This file can only be loaded at the beginning of the program
ob_start();
/*___________ Determine whether the HTML file has been generated. If so, jump to the HTML page___________begin__________*/
$qstring = isset($_SERVER["QUERY_STRING"]) ? $_SERVER["QUERY_STRING"] : " ";
if ($qstring)//The program adds GET request processing
{
                                                                                         efilename}-{$qstring}.html");
}
else
{
define("HTML_FILE", "./h/{$efilename}.html");
}
if (file_exists(HTML_FILE))
{C $ lcdime = filemtime (html_file); // Last Create File Time
IF (($ LCFT+3600) & GT; Time ()) // Determine whether the last generation of HTML file was based on the past 1 time. File content
                                                                                                                                                                    if ($go_html)//Whether to go directly to HTML file display or PHP Read the content output (0: php read content output 1: direct transfer)
                                                                                                                                                                                                                                                                                                                            _contents(HTML_FILE));// Read out the display
                                                                                                                                                                             .
/*___________ Determine whether the HTML file has been generated. If so, jump to the HTML page___________end__________*/
?>
///////////// ///////////////////////////////////////////////////// ///////////////
//
// Zhang Shulin - Huijia Studio
//
// Module Name: index.php
// Abstract: Home information
// Version :                                                                     ​
// Cemail: hoojar@163.com
// MSN: hoojar @hotmail.com
// Copyright 2001-2006, Hoojar studio All Rights Reserved
//
// Copyright 2001-2006, Hoojar studio All rights reserved
//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 .
//Thank you.
//
//This software is free software, and you are allowed to use, copy, modify, and distribute this software and its documentation.
//All copies of the above copyright notice must appear wherever this software is used. This software is maintained by
//Huijia Studio. If you have any questions, please contact us. Thank you for using it.
//
///////////////////////////////////////////////// ///////////////////////////////////
require("woods-thtml.php");//Generate HTML processing Header
//if (count($_GET) < 1 && count($_POST) < 1){require("woods-thtml.php");}//Generate HTML processing header
require("{$exec_file }");//Register language definition file
foreach ($lang as $key => $value)
{
          $atpl[strtoupper($key) ."_LANG"] =  $value; _List common sense items going up __________________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;
/*______________Template operation_______________________________end____________________________*/
require("woods-bhtml.php") ;//Generate HTML processing tail
?>


The above introduces the http://www.google.com.hk/ fast class library for generating static HTML implemented in PHP, including the content of http://www.google.com.hk/. I hope it will be helpful to the PHP tutorial. Interested friends help.


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template