Created
June 7, 2025 19:27
-
-
Save luebbert42/7326986f5d5b4a26b78902a4b70d2ad7 to your computer and use it in GitHub Desktop.
index.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
// Verzeichnis für Views (Templates) | |
Flight::set('flight.views.path', 'templates'); | |
// Route: /hallo → rendert hallo.php | |
Flight::route('/hallo', function () { | |
Flight::render('hallo.php'); | |
}); | |
// Route: /saghallozu/<name> → gibt "Hallo <name>" aus | |
Flight::route('/saghallozu/@name', function ($name) { | |
Flight::render('saghallozu.php', ["name" => $name]); | |
}); | |
// Starte die Anwendung | |
Flight::start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment