php验证日期时间格式

来源:互联网 发布:淘宝买种子 编辑:程序博客网 时间:2024/05/11 02:18

验证如2017-12-12 15:20:20

代码

function is_date($date){    if ($date == date('Y-m-d H:i:s', strtotime($date))) {        return true;    } else {        return false;    }}

原创粉丝点击