本文整理汇总了PHP中URI::shouldShow404方法的典型用法代码示例。如果您正苦于以下问题:PHP URI::shouldShow404方法的具体用法?PHP URI::shouldShow404怎么用?PHP URI::shouldShow404使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类URI
的用法示例。
在下文中一共展示了URI::shouldShow404方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lessc
}
// build css if there is a newer less version
require "classes/less/lessc.inc.php";
$less = new lessc();
$less->setFormatter("compressed");
try {
$less->checkedCompile("css/less/wuza.less", "css/wuza.css");
} catch (exception $e) {
echo '<div class="text-danger bg-danger small-padding">fatal error: ' . $e->getMessage() . '</div>';
}
// allow GZIP Compression
ob_start("ob_gzhandler");
session_start();
// incude classes
include 'classes/controller.php';
include 'classes/model.php';
include 'classes/view.php';
include 'classes/uri.php';
// $_SESSION, $_GET and $_POST - no $_COOKIE but config values
$request = array_merge($_SESSION, $_GET, $_POST, $config);
// add values from fancy url
$url = new URI("wuza");
$request["view"] = $url->shouldShow404("view") ? "404" : strtolower($url->getVar("view"));
// allowed url slash vars - but prefer get params if there are some
foreach (array('file') as $vari) {
$request[$vari] = $request[$vari] ?: $url->getVar($vari);
}
// create controller
$controller = new Controller($request);
echo $controller->display();
$controller->update_session();