您的位置:首页 > 编程语言 > PHP开发

php 生成静态页面函数

2016-12-21 23:37 274 查看
生成页面函数

/**
* 生成页面函数
* $set_path   保存路径
* $set_name   保存的文件名
* $set_con    保存的内容
*/

public function set_up($set_path,$set_name,$set_con)
{
//$set_path = 'application/admin/controller/';
//$set_name = 'trees.html ';//文件名及路径,在当前目录下新建aa.txt文件
$fopen=fopen($set_path.$set_name, 'wb');//新建文件命令

fputs($fopen, $set_con);//向文件中写入内容;
fclose($fopen);
exit;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: