澳门新葡亰娱乐官网php生成静态文件

?phpclass CreateHtml{function mkdir( $prefix= ””article”” ){$y =
date(””Y””);$m = date(””m””);$d =
date(””d””);$p=DIRECTORY_SEPARATOR;$filePath=””article””.$p.$y.$p.$m.$p.$d;$a=explode($p,$filePath);foreach
( $a as $dir){$path.=$dir.$p;if(!is_dir($path卡塔尔国卡塔尔{//echo
””未有这么些目录””.$path;mkdir($path,0755State of Qatar;}}return
$file帕特h.$p;}function start(卡塔尔国{ob_start();}function end(){$info =
ob_get_contents();$fileId = ””12345””;$postfix =
””.html””;$path = $this-mkdir($prefix= ””article””);$fileName =
time().””_””.$fileId.$postfix;$file=fopen($path.$fileName,””w+””);fwrite($file,$info);fclose($file);ob_end_flush();}}??php$s=new
CreateHtml();$s-start();?htmlbodyasdfasdfasdfasdfasdfasdfasdfasdfasdfbradfasdfasdfbr/body/html?php$s-end();?

You can leave a response, or trackback from your own site.

Leave a Reply

网站地图xml地图