This commit is contained in:
2026-04-21 13:56:05 +02:00
parent 894cc2d3fd
commit 3de979fc65
6 changed files with 55 additions and 16 deletions

View File

@@ -1,10 +0,0 @@
<?php
$title = 'Home';
ob_start();
?>
<h1>Welcome</h1>
<p>This is the homepage.</p>
<?php
$content = ob_get_clean();
require_once __DIR__ . '/layout.php';

10
templates/home.php Normal file
View File

@@ -0,0 +1,10 @@
<?php
ob_start();
?>
<h1><?= htmlspecialchars($title) ?></h1>
<p>Willkommen auf meiner Seite!</p>
<?php
$content = ob_get_clean();
require __DIR__ . '/layout.php';

View File

@@ -1,9 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= $title ?? 'Acme' ?></title>
<title><?= htmlspecialchars($title) ?></title>
</head>
<body>
<?= $content ?>