diff options
| author | Connor Thomson <blumatrikz@gmail.com> | 2026-09-18 17:23:39 -0700 |
|---|---|---|
| committer | Connor Thomson <blumatrikz@gmail.com> | 2026-09-18 17:23:39 -0700 |
| commit | 94a6551bafd51deb2bfae144336689eb0472abf6 (patch) | |
| tree | 103db6511e06a43dbc90fc26b89ded9ca519a3d3 /php/app.php | |
Upload files from test.gnufault.org
Diffstat (limited to 'php/app.php')
| -rw-r--r-- | php/app.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/php/app.php b/php/app.php new file mode 100644 index 0000000..cde972d --- /dev/null +++ b/php/app.php @@ -0,0 +1,23 @@ +<?php + +ini_set('display_errors', 1); +error_reporting(E_ALL); + +define('ROOT_DIR', __DIR__ . '/../'); +define('HTML_DIR', __DIR__ . '/../html/'); +define('PHP_DIR', __DIR__ . '/../php/'); + +require_once PHP_DIR . 'templates.php'; + +$file = $_GET['file'] ?? 'index.html'; + +$components = [ + '{{HEADER}}' => HTML_DIR . 'header.html', + '{{CONTENT}}' => ROOT_DIR . $file, + '{{FOOTER}}' => PHP_DIR . 'footer.php' +]; + +$app_html = template_process(HTML_DIR . 'app.html', $components); + +echo $app_html; +?> |
