【发布时间】:2017-07-26 12:37:24
【问题描述】:
我有这段代码,它匹配来自 json 文件的一些路由:
$this->app->match($routePattern, function(Request $request, \Silex\Application $app) use($routeIdent, $templateConfig) {
//now here i need to check some conditions and,
//in case, trigger 404 error, but without redirect!!!!
if($templateConfig['test'] === true){
//----> TRIGGER 404
}
});
有办法处理吗?
【问题讨论】:
标签: php symfony exception http-status-code-404 silex