Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可捕获的致命错误:DateTime 类的对象无法转换为字符串
$timestamp = "$day/$month/$year 00:00:00"; $timestamp = date_create_from_format('d/m/Y H:i:s', $timestamp); echo $timestamp->format('Y-m-d H:i:s');
我该怎么办?
$timestamp = new DateTime(); echo $timestamp->format('Y-m-d H:i:s');
是你要找的吗?