我刚将所有cakephp文件复制到我的localhost(我使用的是最新的XAMPP),当我运行蛋糕时,我收到了一堆警告,如
警告:strtotime()[function.strtotime]:依赖系统的时区设置是不安全的。您必需使用date.timezone设置或date_default_timezone_set()函数。如果您使用了这些方法中的任何一种并且仍然收到此警告,则很可能拼错了时区标识符。我们在第448行的D:\ xampp \ htdocs \ cake \ cake1 \ cake \ libs \ cache.php中选择“亚洲/加尔各答”为“5.5 /无DST”
这是什么以及如何解决?
非常感谢你们
答案 0 :(得分:3)
/app/config/core.php:
/**
* If you are on PHP 5.3 uncomment this line and correct your server timezone
* to fix the date & time related errors.
*/
//date_default_timezone_set('UTC');
您需要设置此项,因为时间相关函数的行为在PHP 5.3中已更改。
答案 1 :(得分:0)
在D:\xampp\php\php.ini
中,您需要设置date.timezone
设置。