Rack::not_found PHP Method

not_found() public static method

public static not_found ( )
    public static function not_found()
    {
        return array(404, array("Content-Type" => "text/html"), "Not Found");
    }

Usage Example

示例#1
0
文件: app.php 项目: jimeh/php-rack
 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();
 }