简易博客系统php原码
简易博客系统php原码 index.php页面: <head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>php首页</title> </head> <body> <a href='add.php'>添加内容</a><hr> <form method="get" action=""> <input type="text" name="keys"> <input type="submit"name="subs" value="搜索"> </form> <hr> <?php include("conn.php");//引入连接数据库 if(!empty($_GET['keys'])){ $w=" `title` like '%".$_GET['keys']."%' "; }else{ $w=1; } $sql="select*from `news` where $w order by id desc limit 20"; $query=mysql_query($sql); while($rs=mysql_fetch_array($query)){ ?> <h2>标题:<a href="view.php?id=<?php echo $rs['id'] ?>"><?php echo $rs['title'] ?></a>|<a href="edit.php?id=<?php echo $rs['id'] ?>">编缉</a>|<a href="del.php?del=<?php echo $rs['id'] ?>">删除</a>|</h2> <li> <?php echo $rs['dates'] ?> </li> <p> <?php echo iconv_substr( $rs['contents'],0,5,"gbk" )?> ...</p> <hr> <?php } ?>
- 1
- 粉丝: 0
- 资源: 2
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
- 1
- 2
- 3
- 4
前往页