. */ 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 . 'replace.php'; require_once PHP_DIR . 'execute.php'; require_once PHP_DIR . 'path-clean.php'; $file = path_clean($_GET['file'] ?? 'index.html'); $device = 'desktop'; $targets = [ '{{header}}' => file_get_contents(HTML_DIR . 'header.html'), '{{content}}' => file_get_contents(ROOT_DIR . $file), '{{footer}}' => execute(PHP_DIR . 'footer.php'), '{{device}}' => $device ]; $app_html = replace(HTML_DIR . 'app.html', $targets); echo $app_html; ?>