0
点赞
收藏
分享

微信扫一扫

php(about error and time)

php(about error and time)_php

可以看到Notice和warning后面的代码会执行,但Fatal error后的代码不会执行。

php(about error and time)_实际开发_02

给错误代码前加@符号可以屏蔽掉错误,不让其显示处理,但实际开发中不会这么做。

php(about error and time)_实际开发_03
php(about error and time)_实际开发_04

在实际开发中错误信息不会让用户看到,需在php.ini中配置display_errors选项。

php(about error and time)_php_05

可以自定义错误日志存放路径和文件,php默认将错误日志存放到指定文件。

php(about error and time)_错误日志_06

php内置了获取服务器当前时间得到函数,并且可以做时区设置。

php(about error and time)_php_07
php(about error and time)_php_08

时区设置可以在php文件中暂时修改,或者到php.ini文件中配置永久生效。将date.timezone的值修改PRC即可对应北京时间。

php(about error and time)_错误日志_09


举报

相关推荐

0 条评论