重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

修正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中的错误示例
网站地址:http://cqcxhl.com/article/gpecso.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP