1
// why does this not work PHP in XAMMP stack
// error: "strtotime is not defined"

$date2 = strtotime('2010-10-01');
4

1 回答 1

1

根据http://us3.php.net/manual/en/calendar.installation.php

要使这些函数工作,您必须使用 --enable-calendar 编译 PHP。

Windows 版本的 PHP 内置了对这个扩展的支持。您无需加载任何其他扩展即可使用这些功能。

或在 OS X 上:

sudo 端口安装 php5-calendar

如果做不到这一点,请尝试在系统的包管理器中查找 php5-calendar。

于 2010-08-12T02:12:44.940 回答