只是一个愚蠢的问题,如何在f3框架中使用错误处理? $this->f3->set('ONERROR', function($f3) {
echo $this->f3->get('ERROR.text');
});
if (a > b) {
//throw error
i want to call error and pass "a is too big!"
使用不含脂肪框架我已经在用户控制器,它定义变量foo的一个函数: public function home(){
$foo = "hello";
}
我在哪个ID希望能够访问该变量foo的另一个功能, public function house(){
$this->f3->set('bar', $foo);
}
我会如何去做这件事?