Compile a regular calendar and show the current day and current month? Phpdate_default_timezone_set (PRC); $ tdategetdate (); current time $ tmday $ tdate [mday]; today's day $ twday $ tdate [wday]; today's day of the week $ mon $ tdate [mon]; month $ year $ tdate [year]; this year
Compile a regular calendar and show the current day and current month? Php date_default_timezone_set ('prc'); $ tdate = getdate (); // current time $ tmday = $ tdate ['mday']; // today's day $ twday = $ tdate ['wday']; // today's day of the week $ mon = $ tdate ['mon']; // month $ year = $ tdate ['Year']; // this year
Compile a common calendar to show the current day and current month <无>
"; $ Html. ="{$ Year}-{$ mon} month"; $ Html. ="SundayMondayTuesdayWednesdayThursdayFridaySaturday"; $ Html. =""; For ($ I = 0; $ I <($ swday % 7); $ I ++) $ html. =''; While ($ counts! = $ Days) {if ($ swday + $ counts) % 7 = 0) $ html. ="". (++ $ Counts ).''; Else if ($ swday + $ counts) % 7 = 6) $ html. ="". (++ $ Counts ).''; Else $ html. ="". (++ $ Counts ).'';} If ($ ewday! = 6) $ html. =''; $ Html. =''; Echo $ html;?>