您好,登錄后才能下訂單哦!
使用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 '<tr class=tr-0><td class=td-0>Start Time</td><td>',date(DATE_FORMAT,$memcacheStatsSingle[$server]['STAT']['time']-$memcacheStatsSingle[$server]['STAT']['uptime']),'</td></tr>';
解決辦法:
24 define('DATE_FORMAT','Y/m/d H:i:s');
之上增加一行
date_default_timezone_set("PRC");
其他方法,例如在php.ini中設置date.timezone的值,無論怎么設置和重啟PHP-FPM進程都不生效,這點比較奇怪;
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。