本文整理汇总了PHP中Errors::r_404方法的典型用法代码示例。如果您正苦于以下问题:PHP Errors::r_404方法的具体用法?PHP Errors::r_404怎么用?PHP Errors::r_404使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Errors
的用法示例。
在下文中一共展示了Errors::r_404方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ini
public static function ini($root = null)
{
//
self::$r_400 = Config::get("error.400");
self::$r_401 = Config::get("error.401");
self::$r_402 = Config::get("error.402");
self::$r_403 = Config::get("error.403");
self::$r_404 = Config::get("error.404");
self::$r_405 = Config::get("error.405");
self::$r_406 = Config::get("error.406");
self::$r_407 = Config::get("error.407");
self::$r_408 = Config::get("error.408");
self::$r_409 = Config::get("error.409");
self::$r_410 = Config::get("error.410");
self::$r_411 = Config::get("error.411");
self::$r_412 = Config::get("error.412");
self::$r_413 = Config::get("error.413");
self::$r_414 = Config::get("error.414");
self::$r_415 = Config::get("error.415");
self::$r_416 = Config::get("error.416");
self::$r_417 = Config::get("error.417");
self::$r_418 = Config::get("error.418");
self::$r_422 = Config::get("error.422");
self::$r_423 = Config::get("error.423");
self::$r_424 = Config::get("error.424");
self::$r_425 = Config::get("error.425");
self::$r_426 = Config::get("error.426");
//
self::$r_500 = Config::get("error.500");
self::$r_501 = Config::get("error.501");
self::$r_502 = Config::get("error.502");
self::$r_503 = Config::get("error.503");
self::$r_504 = Config::get("error.504");
self::$r_505 = Config::get("error.505");
self::$r_507 = Config::get("error.507");
self::$r_509 = Config::get("error.509");
self::$r_db = Config::get("error.database");
//
}
示例2: run
//.........这里部分代码省略.........
break;
}
}
}
}
}
// run the route callback
if ($ok) {
self::$current = $value;
call_user_func_array(self::$_callback[$key], $params);
} else {
if (isset(self::$_falsecall[$falseok]) && !empty(self::$_falsecall[$falseok])) {
$call = self::$_falsecall[$falseok];
$ok = call_user_func($call);
}
}
//
//after filter
//
call_user_func(App::$Callbacks['after']);
$ok = 1;
break;
//
// old
// array_shift($params);
// call_user_func_array(self::$_callback[$key], $params);
// $ok=1;
} else {
if (self::$_type[$key] == "post" && !Res::isPost()) {
$ok = 0;
} else {
if (self::$_type[$key] == "get") {
array_shift($params);
//
//before filter
//
call_user_func(App::$Callbacks['before']);
//
//new filter
//
$ok = true;
$falseok = null;
$oks = array();
//
if (is_string(self::$_request[$key])) {
if (!empty(self::$_request[$key])) {
$call = self::$_filters[self::$_request[$key]];
$ok = call_user_func($call);
if (!$ok) {
$falseok = self::$_request[$key];
}
}
} else {
if (is_array(self::$_request[$key])) {
if (!empty(self::$_request[$key])) {
foreach (self::$_request[$key] as $key2 => $value2) {
$call = self::$_filters[$value2];
$ok = call_user_func($call);
if (!$ok) {
$falseok = $value2;
break;
}
}
}
}
}
// run the route callback
if ($ok) {
self::$current = $value;
call_user_func_array(self::$_callback[$key], $params);
} else {
if (isset(self::$_falsecall[$falseok]) && !empty(self::$_falsecall[$falseok])) {
$call = self::$_falsecall[$falseok];
$ok = call_user_func($call);
}
}
//
//after filter
//
call_user_func(App::$Callbacks['after']);
$ok = 1;
break;
}
}
}
}
}
if ($ok == 0) {
Errors::r_404();
}
} else {
if (Config::get("maintenance.maintenanceEvent") == "string") {
echo Config::get("maintenance.maintenanceResponse");
} else {
if (Config::get("maintenance.maintenanceEvent") == "link") {
Url::redirect(Config::get("maintenance.maintenanceResponse"));
}
}
}
}
示例3: run
public static function run()
{
$currentUrl = self::CheckUrl();
//
if (self::CheckMaintenance($currentUrl)) {
self::ReplaceParams();
self::Replace();
//
$ok = false;
//
foreach (self::$requests as $value) {
$requestsUrl = $value["url"];
//var_dump($value);
//
if (preg_match("#^{$requestsUrl}\$#", $currentUrl, $params)) {
if (!is_null($value["subdomain"])) {
if (Table::contains($value["subdomain"], self::getDomain())) {
if ($value["methode"] == "post" && Res::isPost()) {
$ok = self::exec($params, $value);
break;
} else {
if ($value["methode"] == "post" && !Res::isPost()) {
$ok = 0;
} else {
if ($value["methode"] == "get") {
$ok = self::exec($params, $value);
break;
} else {
if ($value["methode"] == "resource") {
$ok = self::exec($params, $value);
break;
} else {
if ($value["methode"] == "object") {
$ok = self::exec($params, $value);
//var_dump($value);
break;
}
}
}
}
}
} else {
$ok = 0;
}
} else {
if ($value["methode"] == "post" && Res::isPost()) {
$ok = self::exec($params, $value);
break;
} else {
if ($value["methode"] == "post" && !Res::isPost()) {
$ok = 0;
} else {
if ($value["methode"] == "get") {
$ok = self::exec($params, $value);
break;
} else {
if ($value["methode"] == "resource") {
$ok = self::exec($params, $value);
break;
} else {
if ($value["methode"] == "object") {
$ok = self::exec($params, $value);
//var_dump($value);
break;
}
}
}
}
}
}
}
}
if ($ok == 0) {
if (Config::get('app.unrouted')) {
throw new invalidArgumentException("There is no route call's " . $currentUrl . " in your route file");
} else {
Errors::r_404();
}
}
} else {
self::showMaintenance();
}
}