button Add a features section with icons and descriptions Include a stats section with live data Add a responsive design with modern CSS features
41 lines
1.2 KiB
PHP
41 lines
1.2 KiB
PHP
<?php
|
||
$currentTime = date('H:i:s');
|
||
$serverInfo = [
|
||
'PHP-versjon' => PHP_VERSION,
|
||
'Servertid' => $currentTime,
|
||
'Filer i denne katalogen' => count(glob(__DIR__ . '/*')),
|
||
];
|
||
?>
|
||
|
||
<section style="background: linear-gradient(135deg, oklch(95% 0.08 150), oklch(98% 0.04 150)); padding: var(--space-m); border-radius: 0.5rem; margin-block: var(--space-m);">
|
||
<h2 style="margin-block-start: 0;">PHP-komponent</h2>
|
||
<p>Denne seksjonen rendres fra <code>02-dynamic.no.php</code> – en dynamisk PHP-fil som kjører på serversiden.</p>
|
||
|
||
<table style="width: 100%; margin-block: var(--space-s);">
|
||
<thead>
|
||
<tr>
|
||
<th>Egenskap</th>
|
||
<th>Verdi</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php foreach ($serverInfo as $key => $value): ?>
|
||
<tr>
|
||
<td><?= htmlspecialchars($key) ?></td>
|
||
<td><strong><?= htmlspecialchars($value) ?></strong></td>
|
||
</tr>
|
||
<?php endforeach; ?>
|
||
</tbody>
|
||
</table>
|
||
|
||
<p>PHP-filer kan:</p>
|
||
<ul>
|
||
<li>Generere dynamisk innhold</li>
|
||
<li>Spørre databaser</li>
|
||
<li>Lese fra filer eller API-er</li>
|
||
<li>Beregne verdier i farten</li>
|
||
<li>Inkludere egendefinert styling og logikk</li>
|
||
</ul>
|
||
|
||
<p><em>Last inn denne siden på nytt for å se servertiden oppdatere seg!</em></p>
|
||
</section>
|