php 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 'utc' for '8.0/no dst' instead in
这是说明,php中的时区没有设置或是使用的函数不对!
大家可以尝试在php的安装文件里找到php.ini(配置过以后的文件),然后ctrl+f查找“date.timezone”,(没记错应该是第二个文件),配置文件里显示的是“;date.timez/span>”这一句话需要修改,将前面的;去掉,然后在=后面添加上prc,这代表将时区功能开启设置,并设置成中国(prc)时区!
最后,一定要重启服务器(apache,或是iis),然后问题就解决了!!!
版权声明:本文为博主原创文章,未经博主允许不得转载。
以上就介绍了php51以上版本使用date函数是遇到的警告的处理办法,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
