- 博客(1)
- 资源 (2)
- 收藏
- 关注
原创 php简易博客系统原码
效果图: 原码" alt="博客系统bokexitong 原码" src="http://s12.sinaimg.cn/middle/7b6c42a2gc2c06a930f4b&690" width="690" height="580"> 原码" alt="博客系统bokexitong 原码" src="http://www.sinaimg.cn/uc/myshow/blog/mi
2012-06-18 23:36:30 665
简易博客系统php原码
简易博客系统php原码
index.php页面:
<head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>php首页</title>
</head>
<body>
添加内容
<form method="get" action="">
<input type="text" name="keys">
<input type="submit"name="subs" value="搜索">
</form>
<?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)){
?>
标题:<?php echo $rs['title'] ?>|编缉|删除|
<?php echo $rs['dates'] ?>
<?php echo iconv_substr( $rs['contents'],0,5,"gbk" )?> ...
<?php
}
?>
2012-06-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人