php中計算離生日還剩下多少天?
/生日倒計時$birthday = "2017-12-29";date_default_timezone_set("PRC")
;//今天的時間戳$today = time()
;echo "今天是".date("Y-m-d",$today).""
;//生日時間戳$bstamp = strtotime($birthday)
;//倒計時多少天$rev = ceil(($bstamp-$today)/(24*3600))
;echo "距離您的生日還有".$rev."天";