calendar.class.php
代码如下:
function __construct(){
$this->year=isset($_GET["year"]) ? $_GET["year"] : date("Y");
$this->month=isset($_GET["month"]) ? $_GET["month"] : date("m");
$this->start_weekday=date("w", mktime(0, 0, 0, $this->month, 1, $this->year));
$this->days=date("t", mktime(0, 0, 0, $this->month, 1, $this->year));
}
function out(){
echo '';
$this->chageDate("test.php");
$this->weeksList();
$this->daysList();
echo '';
}
private function weeksList(){
$week=array('日','一','二