您的位置:首页 > 其它

错误Warning: date() ... timezone settings

2010-02-25 14:39 459 查看
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /home1/vhost/vh414831/www/shu/model/user.class.php on line 365
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /home1/vhost/vh414831/www/shu/model/user.class.php on line 367
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /home1/vhost/vh414831/www/shu/model/user.class.php on line 367


今天在运行PHP应用时,报了上面的警告,

出现这个可能是以下原因

1.如果装xampp,可能是xampp没装好或者有问题,需要重装

2.php 5.3也可能出这个问题,需要修改php.ini文件 找到date.timezone

将它的改为 date.timezone=utc 将前面的分号去掉,重启服务器

或者在index.php中加上 date_default_timezone_set('UTC');

3.可以将index.php里面的

error_reporting(7);

改为

error_reporting(0);

即可避免它们的出现。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐