默认安装kangle的时候,时间格式是没有设置的,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 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /home/itlife365/wwwroot/global.php on line 492
Warning: mktime() [function.mktime]: 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 /home/itlife365/wwwroot/global.php on line 493
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 /home/itlife365/wwwroot/global.php on line 493
解决方法如下:
设置时区
修改php.ini 文件。目录在
/vhs/kangle/ext/tpl_php5217/php-templete.ini
或者目录/vhs/kangle/ext/tpl_php52/php-templete.ini
添加或者修改
date.timezone = PRC;
然后重启网站服务即可。