php.ini报错问题
我收到此错误: Warning: date() [function.date]: It is not safe to dependent on the system's timezone settings.
在 php.ini
我有错误报告设置为 error_reporting = E_ALL & ~E_NOTICE
。
知道如何摆脱这些警告吗?
编辑:
我想修复错误报告,因为出现了其他类型的警告。
编辑2:
所有警告均与 date.timezone 相关。
谢谢。
I get this error: Warning: date() [function.date]: It is not safe to rely on the system's timezone settings.
In php.ini
I have error reporting set as error_reporting = E_ALL & ~E_NOTICE
.
Any idea how I can get rid of those warnings?
EDIT:
I want to fix the Error Reporting as there's other kinds of Warnings showing up.
EDIT 2:
All warnings were date.timezone related.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在
php.ini
文件中找到此部分:取消注释(删除 ;)并将其更改为正确的时区。有关支持的时区列表: http://php.net/manual/en/timezones.php< /a>
Find this section in the
php.ini
file:Uncomment it (remove the ;) and change it to be the correct timezone. For a list of supported timezones: http://php.net/manual/en/timezones.php
查找:
并取消注释此行:
并选择您的时区...
Look for:
and Uncomment this line:
And choose your time zone...
您可以使用 @ 运算符捕获该警告。我认为关闭警告是不明智的
you could just catch that warning using the @ operator. Turning off warnings is ill advised in my view