PHP error_get_last() 函数
PHP 教程
· 2019-01-24 14:43:20
定义和用法
error_get_last() 函数获得最后发生的错误。
该函数以数组的形式返回最后发生的错误。如果没有错误发生则返回 NULL。
返回的错误数组包含 4 个键名和键值:
- [type] - 错误类型
- [message] - 错误消息
- [file] - 发生错误所在的文件
- [line] - 发生错误所在的行
语法
error_get_last()
实例
<?php echo $test; print_r(error_get_last()); ?>
上面代码的输出如下所示:
Array ( [type] => 8 [message] => Undefined variable: test [file] => C:webfoldertest.php [line] => 2 )
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Artificial Intelligence
Stuart Russell、Peter Norvig / Pearson / 2009-12-11 / USD 195.00
The long-anticipated revision of this #1 selling book offers the most comprehensive, state of the art introduction to the theory and practice of artificial intelligence for modern applications. Intell......一起来看看 《Artificial Intelligence》 这本书的介绍吧!