PHP提示function.date错误解决方法

PHP 1756 0 2012-07-27

PHP提示function.date错误解决方法

<b>Strict Standards</b>:  date() [<a href='function.date'>function.date</a>]:

It is not safe to rely on the system's timezone settings. Please use the date.timezone setting,

the TZ environment variable 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 F:........

 

一般出现这种情况是时间问题,在相应页面上加入下面这句即可:

<?php
date_default_timezone_set('PRC');    //时间区域设置,默认CN
?>

上一篇:新手们,让我们来认识下PHP类(Class)吧

下一篇:PHP获取文件及文件夹大小

讨论数量:0

请先登录再发表讨论。 2024-04-20

天涯网魂
3 杠 5 星
TA 的文章
TA 的随言
TA 的资源链