folderweb/app/default/content/examples/mix-formats/02-dynamic.no.php
Ruben 0e19040473 Create a simple hero section with title, subtitle, and call-to-action
button Add a features section with icons and descriptions Include a
stats section with live data Add a responsive design with modern CSS
features
2025-11-27 21:31:47 +01:00

41 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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>