$fileName = Md5_filename ($rs [0], $rs [' z_a '], $rs [' Filesendid ']);
$path = Get_path ($rs [' Sysa ']). $rs [' z_a ']. ' /';
$parent = $_server["Document_root"];//substr (GETCWD (), 0,strrpos (GETCWD (), ' \ ');
$filePath = $parent. ' \ '. $path;
$tempLate = Str_replace (' {path} ', Path ($rs [' z_a '], $rs [' Sysa ']), $fileContent);
$tempLate = Str_replace (' {htmlabout} ', Htmlabout ($rs [' z_a '],10,8,0, '), $tempLate);
$tempLate = Str_replace (' {htmltemplate} ', Htmltemplate (0), $tempLate);
$tempLate = Str_replace (' {htmlmenu} ', Htmlmenu ($rs [' Sysa ']), $tempLate);
$tempLate = Str_replace (' {htmlHelp} ', HtmlHelp ($rs [' Sysa ']), $tempLate);
$tempLate = Str_replace (' {htmlnews} ', Htmlabout ($rs [' z_a '],0,8,0, '), $tempLate);
$tempLate = Str_replace (' {htmlhot} ', Htmlabout ($rs [' z_a '],0,8,1, '), $tempLate);
$tempLate = Str_replace (' {htmlsoure} ', Htmltemplate (1), $tempLate);
$tempLate = Str_replace (' PHP simply generates HTML static page code ', $rs [' title '], $tempLate);
$tempLate = Str_replace (' {htmlcontent} ', $rs [' content '], $tempLate);
$tempLate = Str_replace (' {description} ', $rs [' description '], $tempLate);
$tempLate = str_replace (' {keywords} ', $rs [' keywords '], $tempLate);
Makehtml ($tempLate, $filePath, $fileName);
function makehtml ($msgContent, $filePath, $fileName) {//Generate HTML file
if (!is_dir ($filePath)) {@mkdir ($filePath);}
Die ($filePath);
$handle = fopen (str_replace (' \ ', '). /', $filePath. $fileName), ' w+ ') or Die ("can ' t create file! $fileName");
Fwrite ($handle, $msgContent);
Fclose ($handle);
}
The original site of the transfer note: www.111cn.net/phper/php.html