-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·52 lines (50 loc) · 971 Bytes
/
Copy pathindex.php
File metadata and controls
executable file
·52 lines (50 loc) · 971 Bytes
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
<?php
$mysqli = new mysqli("localhost", "root", "user", "test-deploy");
if ($mysqli->connect_errno) {
echo "Не удалось подключиться к MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
// echo $mysqli->host_info . "\n";info
$mysqli->real_query("SELECT * FROM info");
$res = $mysqli->use_result();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test</title>
<style>
body {
background: #eff0f1;
}
.container {
margin:0 auto;
background: #fafbfc;
height: 50vh;
width: 1024px;
padding:20px;
}
h1{
margin: 10px 0;
}
header{
border-bottom: 1px solid #e1e4e8;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>Test</h1>
<a href="/about_as.php">Home</a>
</header>
<div class="main">
<?php
while ($row = $res->fetch_assoc()) {
echo $row['text'];
}
?>
</div>
</div>
</body>
</html>