forked from GiGatR00n/Aion-Core-v4.7.5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CheckController.php
56 lines (43 loc) · 1.56 KB
/
CheckController.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
<?php
class CheckController extends Controller
{
public $layout='//content';
public function actionIndex()
{
echo '<title>Minimum server requirement checks</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<style>
body {font: 10pt Verdana, sans-serif; color:#444; background: #EBEDF0;}
table {font: 10pt Verdana, sans-serif; color:#444; margin: auto; border-spacing: 10px;}
td {border: solid 1px #888; background: #FAFAFA; padding: 10px 20px;}
</style>
<table>
<tr>
<td>PHP version: <b>'.PHP_VERSION.'</b></td>
<td>'.$this->php_check().'</td>
</tr>
<tr>
<td>pdo_mysql extension check</td>
<td>'.$this->pdo_mysql_check().'</td>
</tr>
<tr>
<td>pdo_sqlite caching check</td>
<td>'.$this->pdo_sqlite_check().'</td>
</tr>
</table>
<br />';
phpinfo();
}
public function php_check() {
if (PHP_VERSION >= 5.2) return '<font color="green">Successful</font>';
else return '<font color="red">Failed - Please upgrade to PHP version <b>5.2</b> or <b>5.3</b>.</font>';
}
public function pdo_mysql_check() {
if (extension_loaded('pdo_mysql')) return '<font color="green">Successful</font>';
else return '<font color="red">Failed - Please install the PHP extension <b>pdo_mysql</b>.</font>';
}
public function pdo_sqlite_check() {
if (extension_loaded('pdo_sqlite')) return '<font color="green">Successful</font>';
else return '<font color="orange">Failed - Please install the PHP extension <b>pdo_sqlite</b>.</font>';
}
}