居然说我错了,,,我也是无语,这个答案的判断能做好点吗?
<?php
date_default_timezone_set('Asia/ShangHai');
$today = date('m-d',time());//获取当天日期
$birthday = "02-14";//生日
$money = 238;//消费金额
$discount = 0.8;//八折优惠
if(!($birthday==$today)){
$money=$money*1;
}else{
$money=$money*$discount;
}
echo $money;
?>