我尝试使用Codeigniter" classic"日历库:
class My_calendar extends CI_Controller{
function showcal ($year=NULL, $mounth=NULL) {
echo "Select".br(3);
$pref = array (
'show_next_prev'=>'TRUE',
//'next_prev_url'=> base_url().'my_calendar/showcal'
'next_prev_url'=>base_url() .'my_calendar/showcal'
);
var_dump($pref);
$this->load->library('calendar',$pref);
echo $this->calendar->generate($year, $mounth);
}
Config.php:
$config['base_url'] = '';
系统> libraries-> Calendar.php:
var $show_next_prev = TRUE;
var $next_prev_url = '';
当我点击"<<"或">>"要更改月份和年份,它会显示消息:
" 404页面未找到 - 您请求的分页不是 发现"
PS:当我使用var_dump($ pref)时,它会显示:
'show_next_prev' => string 'TRUE' (length=4)
'next_prev_url' => string 'http://localhost/my_calendar/showcal'