创建一个获取星期几、日、月为内容的自动口令

<?php
$currentDay = date('j');
$currentMonth = date('n');
$currentDay = (int)$currentDay;
$currentMonth = (int)$currentMonth;
$date = new DateTime(); // 创建一个DateTime对象,默认为当前日期和时间
$week = $date->format('N'); // 获取星期几,1表示星期一,7表示星期日
echo "今天的口令是:".$currentDay . $week . $currentMonth;
?>