复制代码 代码如下:
/*********************/
/* */
/* Version : 5.2.5 */
/* Author : liqiangwork#sohu.com */
/* QQ : 570937581 */
/* */
/*********************/
//-----------------------------生成静态的类-------------------------------
class Makehtml{
public $MbUrl,$OutUrl,$AllHtml,$SouChar,$ObjChar; //变量
public $row; //游标
public $Shuzusou,$Shuzuobj; //替换的字符串数组
//-----------------------初始化-------------------------
function __construct(){ //初始化
$this->MbUrl="";
$this->OutUrl="";
$this->AllHtml="";
$this->Sql="";
$this->SouChar="";
$this->ObjChar="";
}
//-----------------------------自动按字段替换---------------------------
function AutoReplace(){
//------------------自动获取要替换的字符串-------------------
$tlen=count($row);
$shuzu1=array();
$shuzu2=array();
if($row){
$i=0;
foreach($row as $key => $value){
$shuzu2[i]="";
$shuzu1[i]=$value;
$i++;
}
$this->Replacehtml(shuzu2,shuzu1);
}
//------------------自动获取要替换的字符串-------------------
}
//-----------------------------自动按字段替换完成------------------------
//-----------------------------批量替换数组--------------------------
function Replacehtml($Shuzusou,$Shuzuobj){ //批量替换数组
if(count($Shuzusou)!=count($Shuzuobj)){
exit("替换数组不匹配");
}
if($this->AllHtml==""){
exit("没有要替换的内容");
}
for($i=0;$i
//print("
".$Shuzusou(i)."=".$Shuzuobj(i)."
")
}
}
//-----------------------------批量替换数组完成--------------------------
//-----------------------------读取文件---------------------------------
function Readfile(){
$file=fopen($this->MbUrl,"r");
$fsize=filesize($this->MbUrl);
$this->AllHtml=fread($file,$fsize);
fclose($file);
}
//-----------------------------读取文件完成------------------------------
//-----------------------------保存文件---------------------------------
function SaveFile(){
$file=fopen($this->OutUrl,"w");
fwrite($file,$this->AllHtml);
fclose($file);
}
//-----------------------------保存文件完成------------------------------
}
//------------------------------生成静态的类完成-------------------------------
相关实例:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function