mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
增加halt方法用于变量调试并中断输出
This commit is contained in:
12
helper.php
12
helper.php
@@ -511,3 +511,15 @@ if (!function_exists('abort')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!function_exists('halt')) {
|
||||||
|
/**
|
||||||
|
* 调试变量并且中断输出
|
||||||
|
* @param mixed $var 调试变量或者信息
|
||||||
|
*/
|
||||||
|
function halt($var)
|
||||||
|
{
|
||||||
|
dump($var);
|
||||||
|
throw new \think\exception\HttpResponseException(new Response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user