mirror of
https://github.com/jimeh/php-rack.git
synced 2026-02-18 19:36:39 +00:00
16 lines
373 B
PHP
16 lines
373 B
PHP
<?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();
|
|
}
|
|
|
|
}
|
|
|
|
?>
|