Skip to content

Commit b35a799

Browse files
committed
Check requirements
1 parent 59eec58 commit b35a799

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

samples/bootstrap/css/phpword.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
body {
2-
padding-top: 20px;
3-
padding-bottom: 20px;
2+
padding-top: 20px;
3+
padding-bottom: 20px;
44
}
5-
65
.navbar {
7-
margin-bottom: 20px;
6+
margin-bottom: 20px;
7+
}
8+
.passed {
9+
color: #339900;
10+
}
11+
.failed {
12+
color: #ff0000;
813
}

samples/index.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,18 @@
1111
</p>
1212
</div>
1313
<?
14+
$requirements = array(
15+
'php' => array('PHP 5.3.0', version_compare(phpversion(), '5.3.0', '>=')),
16+
'zip' => array('PHP extension ZipArchive', extension_loaded('zip')),
17+
'xml' => array('PHP extension XML', extension_loaded('xml')),
18+
'gd' => array('PHP extension GD (optional)', extension_loaded('gd')),
19+
);
20+
echo "<h3>Requirements</h3>";
21+
echo "<ul>";
22+
foreach ($requirements as $key => $value) {
23+
$status = $value[1] ? 'passed' : 'failed';
24+
echo "<li>{$value[0]} ... <span class='{$status}'>{$status}</span></li>";
1425
}
26+
echo "</ul>";
27+
} // if (!CLI)
1528
include_once 'Sample_Footer.php';

0 commit comments

Comments
 (0)