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.
给出日期含义的代码不能超过当前日期?
<?php else if($cust_dob date("d-m-y")){ echo "Error : Your date of birth cannot be in future."; } ?>
尝试以下代码:
$cust_dob = "2013-09-03"; if(strtotime($cust_dob) > time()) echo "Error : Your date of birth cannot be in future.";