时间:2021-07-01 10:21:17 帮助过:6人阅读
//在action中
$fromYear = "2010"; //起始年
$toYear = date("Y"); //结束年
$listYear = array();
while( $toYear >= $fromYear ){
$listYear[$fromYear] = $fromYear;
++$fromYear;
}
$this->assign("listYear",$listYear);
$this->assign("selectYear",array($toYear));
/模板中
选择年:
年