本文整理汇总了PHP中bootstrap::error方法的典型用法代码示例。如果您正苦于以下问题:PHP bootstrap::error方法的具体用法?PHP bootstrap::error怎么用?PHP bootstrap::error使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bootstrap
的用法示例。
在下文中一共展示了bootstrap::error方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$array = $route->getTarget();
if (isset($array["get"])) {
$_GET[$array["get"]] = true;
}
if (isset($array["post"])) {
$_GET[$array["post"]] = true;
}
foreach ($route->getParameters() as $key => $value) {
$_GET[$key] = mysql_real_escape_string($value);
$_POST[$key] = mysql_real_escape_string($value);
}
$loadPage = $APP_DIR . "/controller/" . $array["url"] . ".php";
} else {
$loadPage = "";
}
// Begin loading the routed page
if (!empty($loadPage)) {
require_once $loadPage;
} else {
if ($config->logs) {
$t = getdate();
$time = "[ " . $t['hours'] . ":" . $t['minutes'] . ":" . $t['seconds'] . " ] ";
$timeFile = $t['year'] . "-" . $t['mon'] . "-" . $t['mday'] . "_";
$fh = fopen($APP_DIR . "/logs/" . $timeFile . "router_noroute.log", 'a');
$stringData = $time . "No route found for: " . $_SERVER["REQUEST_URI"] . "\n";
fwrite($fh, $stringData);
fclose($fh);
}
header("HTTP/1.0 404 Not Found");
$cms->error("No route found for '" . $_SERVER["REQUEST_URI"] . "'");
}