这个问题在这里已经有了答案:HowtocalculatethedifferencebetweentwodatesusingPHP?(35个回答)关闭9年前。我有以下三个字符串(当前时间、日落和日出),如何找到当前时间是否在日出和日落之间?$current_time="10:59pm";$sunrise="5:42am";$sunset="6:26pm"; 最佳答案 $current_time="4:59pm";$sunrise="5:42am";$sunset="6:26pm";$date1=DateTime::createFrom