函數 CreateShtml()
{
ob_start(array("callback_CreateShtml","callback_GoToShtml"));
}
函數callback_CreateShtml($buffer)
{
$page = intval(@$_REQUEST["page"]);
$fileName = $_SERVER['DOCUMENT_ROOT']。 ==0 ?""::"_".strval($page))。 「.htm」;
$fp = fopen($fileName,"wb");
fwrite($fp,$buffer);
fclose($fp);
返回$buffer;
}
函數callback_GoToShtml($buffer)
{
$page = intval(@$_REQUEST["page"]);
$fileName = basename($_SERVER['PHP_SELF'],".php") 。 🎜>header("位置:" . $fileName);
返回$buffer;
}
函數 GoToShtml()
{
$page = intval(@$_REQUEST["page"]);
$fileName = basename($_SERVER['PHP_SELF'],".php") 。 >if(file_exists($fileName))
header("位置:" . $fileName);
}
函數DeleteShtml($fileName=NULL)
{
if(is_null($fileName))
$fileName = $_SERVER['DOCUMENT_RO_RO_RO $_SERVER['PHP_SELF'];
if($fileName[0]=="/")
$fileName = $_SERVER['DOCUMENT_ROOT'] 。
$dir = dir($path);
$patten =“/^”。
while(($entry = $dir->read())!==false)
{
if(is_file($path . "/" .$entry) && preg_match($path . "/" .$entry) && preg_match($path . $ Entry))
取消連結($path . "/" . $entry);
}
}
以上就介紹了http://www.kaqima.com/index.ht PHP靜態新聞清單自動產生程式碼,包括http://www.kaqima.com/index.ht方面的內容,希望對PHP教學有興趣的朋友有幫助。