Calendar written in php_PHP tutorial

WBOY
Release: 2016-07-21 16:10:29
Original
904 people have browsed it


There are many calendars written in JavaScript on the Internet. These calendars read local time and may be inaccurate. So I wanted to find a calendar written in PHP that could read server time, but I couldn't find a suitable one, so I tried to write one myself. Code copy box
0 && intval($HTTP_GET_VARS['month'])<13)?intval($HTTP_GET_VARS[' month']):date("m"); $ynow=(isset($HTTP_GET_VARS['year']) && intval($HTTP_GET_VARS['year'])>1969 && intval($HTTP_GET_VARS['year'])<2038)?intval($HTTP_GET_VARS[' year']):date("Y"); $mtime=mktime(0,0,0,$mnow,date("d"),$ynow); $f=date("w",mktime(0,0,0,$mnow,1,$ynow))-1; echo "

"; echo ""; echo ""; for($i=0;$i"; echo " $i%7==6)?" class="calendarw"":"").">"; if($i>$f)echo $i-$f; echo ""; if($i%7==6)echo ""; } if($i%7<6 && $i%7>0)echo "" ; if($i%7==6)echo ""; echo "
< ".$ynow."><".date("M",$mtime)." >
SMTWTFS
"; ?>
[Ctrl+A select all then copy]

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/314227.htmlTechArticleThere are many calendars written in JavaScript on the Internet. These calendars read local time and may be inaccurate. So I want to find a calendar written in php that can read server time, but...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!