mirror of
https://github.com/jimeh/php-rack.git
synced 2026-02-19 11:56:38 +00:00
initial commit
This commit is contained in:
16
app/app.php
Normal file
16
app/app.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
class App {
|
||||
|
||||
function call (&$env) {
|
||||
if ( $env["PATH_INFO"] == "/" ) {
|
||||
return array(200, array("Content-Type" => "text/html"), array("Welcome Home"));
|
||||
} elseif ( preg_match("/^\/about\/?/i", $env["PATH_INFO"]) ) {
|
||||
return array(200, array("Content-Type" => "text/html"), array("Rack-style middleware is cool."));
|
||||
}
|
||||
return Rack::not_found();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user