-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
78 lines (66 loc) · 2 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
header("Content-Type:text/html; charset=UTF-8");
include("/core/core.php");
$sql="select * from `article` ORDER BY pid DESC limit 0,10";
$db_result=$db->query($sql);
$blogs=array();
while($row=$db_result->fetch_assoc()){
$blogs[]=$row;
}
?>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="renderer" content="webkit"/>
<title>M博客-采用原生PHP开发</title>
<link href="/blog/dist/css/bootstrap.css" rel="stylesheet"/>
<script src="/blog/dist/js/jquery-3.2.1.min.js"></script>
<script src="/blog/dist/js/bootstrap.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="jumbotron">
<h1><?php echo $rows['title'] ?></h1>
<p><?php echo $rows['info'] ?></p>
<p><a class="btn btn-primary btn-lg" href="/" role="button">首页</a></p>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-8">
<?php foreach ($blogs as $key) :?>
<div class="panel panel-default">
<div class="panel-heading"><a href="read.php?pid=<?php echo $key['pid'] ?>"><?php echo $key['ptit'] ?></a></div>
<div class="panel-body">
<?php echo mb_substr(strip_tags($key['pcontent']),0,100,'utf-8') ?>...
</div>
</div>
<?php endforeach ?>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">作者简介</div>
<div class="panel-body">
<p>五年前端经验,今年首次进入后端领域,首选Php作为切入口,不选Nodejs,Java是因为配置太麻烦,喜欢快速开发项目!</p>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">博客介绍</div>
<div class="panel-body">
本博客主要采用原生PHP开发,不足之处请多谅解!<br/>
1:管理员功能<br/>
2:文章管理<br/>
3:系统配置<br/>
</div>
</div>
</div>
</div>
</div>
</body>
</html>