$date = date_create('2000-01-01');
if (! $date) {
$e = DateTime::getLastErrors();
foreach ($e['errors'] as $error) {
echo "$error<br />";
}
exit(1);
}
echo date_format($date, "Y-m-d h:i:sa");$e['errors']这个是不是getlasterrors里有个errors字段的?为什么手册里没有说明的?
if (! $date) {
$e = DateTime::getLastErrors();
foreach ($e['errors'] as $error) {
echo "$error<br />";
}
exit(1);
}
echo date_format($date, "Y-m-d h:i:sa");$e['errors']这个是不是getlasterrors里有个errors字段的?为什么手册里没有说明的?
(
[warning_count] => 1
[warnings] => Array
(
[6] => Double timezone specification
) [error_count] => 1
[errors] => Array
(
[0] => The timezone could not be found in the database
))