复制代码 代码如下:
function CreateShtml()
{
ob_start("callback_CteateShtml");
}
function callback_CteateShtml($buffer)
{
$page = intval(@$_REQUEST["page"]);
//$fileName = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . "/article/" . basename($_SERVER['PHP_SELF'],".php") . ($page==0 ? "" : "_" . strval($page)) . ".html";
$fileName = basename($_SERVER['PHP_SELF'],".php") . ($page==0 ? "" : "_" . strval($page)) . ".html";//可以在这里修改你的静态页面路径
$fp = fopen($fileName,"wb");
fwrite($fp,$buffer);
fclose($fp);
return $buffer;
}
?>
复制代码 代码如下:
include("static.php");
CreateShtml();
?>