-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
66 lines (65 loc) · 2.84 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LAMP STACK</title>
<link rel="stylesheet" href="/assets/css/bulma.min.css">
</head>
<body>
<section class="hero is-medium is-info is-bold">
<div class="hero-body">
<div class="container has-text-centered">
<h1 class="title">
LAMP STACK
</h1>
<h2 class="subtitle">
Your local development environment
</h2>
</div>
</div>
</section>
<section class="section">
<div class="container">
<div class="columns">
<div class="column">
<h3 class="title is-3 has-text-centered">Environment</h3>
<hr>
<div class="content">
<ul>
<li><?= apache_get_version(); ?></li>
<li>PHP <?= phpversion(); ?></li>
<li>
<?php
$link = mysqli_connect("database", "root", $_ENV['MYSQL_ROOT_PASSWORD'], null);
/* check connection */
if (mysqli_connect_errno()) {
printf("MySQL connecttion failed: %s", mysqli_connect_error());
} else {
/* print server version */
printf("MySQL Server %s", mysqli_get_server_info($link));
}
/* close connection */
mysqli_close($link);
?>
</li>
</ul>
</div>
</div>
<div class="column">
<h3 class="title is-3 has-text-centered">Quick Links</h3>
<hr>
<div class="content">
<ul>
<li><a href="/phpinfo.php">phpinfo()</a></li>
<li><a href="http://localhost:<? print $_ENV['PMA_PORT']; ?>">phpMyAdmin</a></li>
<li><a href="/test_db.php">Test DB Connection with mysqli</a></li>
<li><a href="/test_db_pdo.php">Test DB Connection with PDO</a></li>
</ul>
</div>
</div>
</div>
</div>
</section>
</body>
</html>