//<-------Process variables submitted through the GET method; start-------->
if($HTTP_GET_VARS[year]==" ")
{
$HTTP_GET_VARS[year]=date("Y");
}
if($HTTP_GET_VARS[month]=="")
{
$HTTP_GET_VARS [month]=date("n");
}
$month=$HTTP_GET_VARS[month];
$year=$HTTP_GET_VARS[year];
//<---- ---Process variables submitted through the GET method; end-------->
if($year<1971)
{
echo "Error!";
echo "
";
echo "Back";
exit();
}
?>
//<------Processing when the month exceeds 1 to 12; Start -------> if($month<1) { $month=12; $year-=1; } if( $month>12) { $month=1; $year+=1; } //<------When the month exceeds 1 to 12 Processing; end-------> //******************************** ******* //<---------Connection processing and output of the previous year, next year, last month, and next month; start------- --> echo "<<>>"; ? > | | year."><<month> >"; //<--------Connection processing and output of the previous year, next year, last month, and next month; end------ ---> ?> | ||||
日 | One | Two | Three | Four | Five | Six |
} | ".font_style($month,1,$year)."1 | n ";".font_style($month,$i,$year)."$in"; if(date("w",mktime(0,0,0,$month,$i,$year))==6)//Judge whether the day is Saturday { echo "n"; } } } http://www.bkjia.com/PHPjc/317347.html www.bkjia.com source:php.cn
Previous article:Getting Started with Expanding Your PHP_PHP Tutorial
Next article:Summary on time calculation_PHP tutorial
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
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
|