php中验证YYYY-MM-DD日期格式时间:2023-02-19 15:16:53 <?php $file_name="2010-09-09"; $format="Y-m-d"; $unixTime=strtotime($file_name); $checkDate= date($format,$unixTime); print($checkDate); if($file_name==$checkDate) {echo "对了";} else echo "错了"; ?>