[英]DateTime::__construct(): Failed to parse time string (//) at position 0 (/): Unexpected character
[英]Message: DateTime::__construct(): Failed to parse time string (21/12/2020) at position 0 (2): Unexpected character
$start = new DateTime(21/12/2020);
執行此語句時,出現以下錯誤:類型:異常
消息:DateTime::__construct():無法在 position 0 (2) 解析時間字符串 (21/12/2020):意外字符
此錯誤的原因可能是什么,解決方案是什么?
嘗試用點或斜線替換斜線(如 21\/12\/2020)。 最好不要在這種情況下使用斜杠。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.