$sql="select * from dede_archives" ; $res=mysql_query($sql); $row=mysql_query_fetch($res);
$row[title] $row[content] …… 很多个值。
怎么样把这个结果写到 指定的模板 (模板已有样式 show.htm )
------解决方案--------------------
------解决方案-------------------- define('INTSIDE_CATALOG_ROOT', '本地URL'); foreach ($date as $rows) { $html.=''; $html.=''; $html.=''; } $open=fopen(INTSIDE_CATALOG_ROOT.$var_name_sql[0]['Type_varname'].'.html',"w+"); $write_in=fwrite($open,$html); if ($write_in==false){ $mg=$var_name_sql[0]['Type_varname'].'文件生成失败';//向日志中添加数据 Log_File::writeAppwwwadminLog($mg); } fclose($open);
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn