Skip to content

Commit de84a3d

Browse files
committed
Examples: better php ini view
1 parent 3ca43c4 commit de84a3d

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

examples/php-server/ini/index.php

+21-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
<?php
1+
<h1>php.ini</h1>
22

3+
<table>
4+
<thead>
5+
<tr>
6+
<th>option</th>
7+
<th>global_value</th>
8+
<th>local_value</th>
9+
<th>access</th>
10+
</tr>
11+
</thead>
12+
<tbody>
13+
<?php
314
foreach (ini_get_all() as $name => $group) {
4-
echo "<h1>$name</h1>";
5-
foreach ($group as $k => $v) {
6-
echo "$k => $v<br>";
7-
}
15+
echo "<tr>";
16+
echo sprintf('<td>%s</td>', $name);
17+
echo sprintf('<td>%s</td>', $group['global_value']);
18+
echo sprintf('<td>%s</td>', $group['local_value']);
19+
echo sprintf('<td>%s</td>', $group['access']);
20+
echo "</tr>";
821
}
22+
?>
23+
</tbody>
24+
</table>

0 commit comments

Comments
 (0)