|
|
发表于 2024-5-20 21:37:08
|
显示全部楼层
- function abss($bls) {
- $date = new DateTime($bls);
- $str = $date->getTimestamp();
- $now = time();
- if ($str > $now) {
- return "即将开始";
- } else {
- if ($now < ($str + 180 * 60 * 1000)) {
- return "直播中";
- } else {
- return "已结束";
- }
- }
- }
- $zanpian_vod_filmtime = "2022-01-01 12:00:00"; // 示例日期时间,请替换为实际值
- echo abss($zanpian_vod_filmtime);
复制代码 |
|