Very strange, know where the bug is, but do not know why this bug occurred?
PHP Code
Year=isset ($_get["year"])? $_get[[year]:d ate ("Y"); $this->month=isset ($_get["month")? $_get["Month"]:d ate ("n"); $this->daynum=date ("T", Mktime (0,0,0, $this->month,1, $this->year)); $this->start_day=date ("W", Mktime (0,0,0, $this->month,1, $this->year)); } function out () {echo '
'; $this->changecalendar (); $this->daylist (); $this->formset (); Echo '
'; } function Daylist () {$day =array (' Day ', ' one ', ' two ', ' three ', ' four ', ' five ', ' VI ', ' VII '); Echo ''; for ($i =0; $i <7; $i + +) {echo ''; echo $day [$i]; Echo ''; } Echo ''; } function FormSet () {echo ''; for ($j =0; $j < $this->start_day; $j + +) echo ' '; $k = $this->start_day; for ($j =1; $j <= $this->daynum; $j + +) {if ($j ==date ("J")) {echo ''. $j. ''; }else{Echo ''. $j. ''; } $k + +; if ($k%7==0) echo ''; }} Private Function Changecalendar () {echo '';//This normal echo 'Prevyear ($this->year, $this->month). ' " > '. ' << '. '';//This abnormal echo 'Preyear (). ' " > '. ' << '. ''; Echo ''. $this->year. '-' $this->month. ''; Echo ''; } Private Function Prevyear ($year, $month) {$year = $year-1; if ($year < 1970) $year = 1970; Return "year={$year}&month={$month}"; } Private Function Preyear () {$this->year= $this->year-1; if ($this->year<1970) {$this->year=1970; } return "year={$this->year}&month={$this->month}"; } Private Function Premonth () {if ($this->month = = 1) {$this->year= $this-> ; year-1; $this->month=12; }else{$this->month= $this->month-1; } echo "111"; Return ' year= '. $this->year. ' &month= '. $this->month; } Private Function Nextyear () {$this->year= $this->year + 1; if ($this->year>2038) {$this->year=2038; } return ' year= '. $this->year. ' &month= '. $this->month; } Private Function Nextmonth () {if ($this->month==12) {$this->month=1; $this->year= $this->year + 1; }else{$this->month= $this->month + 1; } return ' year= '. $this->year. ' &month= '. $this->month; } }