一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

PHP简单日历实例

时间:2008-04-24 编辑:简简单单 来源:一聚教程网

/*
 * PHP简单日历实例
 * 作者: 多菜鸟
 * 邮箱: kingerq AT msn DOT com
 * 来源: http://blog.111com.net/kingerq/
 * 创建时间: 2008-01-03
**/

$date = preg_match("/d{4}-d{2}-d{2}/", $_GET["YMD"]) ? $_GET["YMD"] : date( "Y-m-d" );
$thisYear = date( "Y", strtotime( $date) );
$thisMonth = date( "m", strtotime( $date) );
$firstDay = date( "w", strtotime( $thisYear."-".$thisMonth."-01" ) );
$monthNum = date( "t", strtotime( $date) );
?>


Calendar



 
   
     
 

"><<Last Year