RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
修正memcache.php中的错误示例

使用memcache.php监控memcache后,在页面报时间格式的错误:

专注于为中小企业提供网站设计制作、成都网站设计服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业祁连免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了数千家企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。

Warning: 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in/usr/local/nginx/html/memcache.phpon line 736

根据提示可以列出memecache.php相关的行数内容;

24 define('DATE_FORMAT','Y/m/d H:i:s');
736 echo 'Start Time',date(DATE_FORMAT,$memcacheStatsSingle[$server]['STAT']['time']-$memcacheStatsSingle[$server]['STAT']['uptime']),'';

解决办法:

24 define('DATE_FORMAT','Y/m/d H:i:s');

之上增加一行

date_default_timezone_set("PRC");

其他方法,例如在php.ini中设置date.timezone的值,无论怎么设置和重启PHP-FPM进程都不生效,这点比较奇怪;


当前题目:修正memcache.php中的错误示例
标题URL:http://scpingwu.com/article/gpecso.html