生成静态页面:
先得到String
可以
1 模板(phplib等)
2 输出控制函数中 ob_系列函数
3 file_get_contents($URL)再用
/**
* 写文件操作
*
* @access public
* @param bool
* @return void
*/function wfile($file,$content,$mode='w') {
$oldmask = umask(0);
$fp = fopen($file, $mode);
if (!$fp) return false;
fwrite($fp,$content);
fclose($fp);
umask($oldmask);
return true;
}写到文件
先得到String
可以
1 模板(phplib等)
2 输出控制函数中 ob_系列函数
3 file_get_contents($URL)再用
/**
* 写文件操作
*
* @access public
* @param bool
* @return void
*/function wfile($file,$content,$mode='w') {
$oldmask = umask(0);
$fp = fopen($file, $mode);
if (!$fp) return false;
fwrite($fp,$content);
fclose($fp);
umask($oldmask);
return true;
}写到文件
这样使用.
用绝对路径:
/文件夹/文件