会员: 密码:  免费注册 | 忘记密码 | 会员登录 网页功能: 加入收藏 设为首页 网站搜索  
 安全技术技术文档
  · 安全配制
  · 工具介绍
  · 黑客教学
  · 防火墙
  · 漏洞分析
  · 破解专题
  · 黑客编程
  · 入侵检测
 安全技术论坛
  · 安全配制
  · 工具介绍
  · 防火墙
  · 黑客入侵
  · 漏洞检测
  · 破解方法
  · 杀毒专区
 安全技术工具下载
  · 扫描工具
  · 攻击程序
  · 后门木马
  · 拒绝服务
  · 口令破解
  · 代理程序
  · 防火墙
  · 加密解密
  · 入侵检测
  · 攻防演示
技术文档 > Web开发 > PHP
一个个人网页自动化生成系统(3)
发表日期:2004-07-20 21:38:44作者: 出处:  

单页生成,文件名:shengcheng.php
<html>

<body background="image/b-graingr1.jpg">

<?php

$db = mysql_connect("localhost", "root");

mysql_select_db("study",$db);
// 把文章写入数据库
$t = date("Y-m-d h:i:s");
$sql = "INSERT INTO wenzhang (timu,zuozhe,laiyuan,textt,riqi)  
    VALUES ('$timu','$zuozhe','$laiyuan','$textt','$t')";
$result = mysql_query($sql);
// 把计数器加一
$fdd=fopen("count.txt","r");
$cdd=fread($fdd,5);
$cdd++;
fclose($fdd);
$fdd=fopen("count.txt","w");
fwrite($fdd,$cdd);
fclose($fdd);
// 文章生成
$muoban1 = fopen("muoban1.txt","r");
$muoban2 = fopen("muoban2.txt","r");  
$muoban3 = fopen("muoban3.txt","r");
$qita = "<p><table width="75%" border="0" align="center">
  <tr>  
    <td class=p9>  
      <div align="center">作者:<font color="#306800">$zuozhe</font> ??来源:<font color="#306800">$laiyuan</font>  
        ??时间:<font color="#336600">$t</font> </div>
    </td>
  </tr>
</table></p>";
$muoban4=fread($muoban1,1000);
$muoban5=fread($muoban2,1000);
$muoban6=fread($muoban3,1000);
fclose($muoban1);
fclose($muoban2);
fclose($muoban3);
$main="$muoban4 $timu $qita $muoban5 $textt $muoban6";
// 文章生成
$ttt=".html";
$n=$cdd.$ttt;
$f = fopen($n,"a");
fwrite($f,$main);
fclose($f);
print "<center><b>递交成功<br>";

?>
<p><br></p>
<p><br></p>
<center><a href="input.php">继续递交</a>??<a href="guanli.php">管理文件</a></center>
</body>
</html>
   

【本文版权归作者time2与奥索网共同拥有,如需转载,请注明作者及出处】    



返回顶部】 【打印本页】 【关闭窗口

关于我们 / 给我留言 / 版权举报 / 意见建议 / 网站编程QQ群   
Copyright ©2003- 2024 Lihuasoft.net webmaster(at)lihuasoft.net 加载时间 0.00143