CodeIgniter 框架下一月/上一月链接设置
$prefs = array ('show_next_prev'=> TRUE,
'next_prev_url' => 'http://localhost/zhangjs'
);
$this->load->library('calendar',$prefs);
$calendar_array = $this->calendar->generate();
你必须向日历创建函数提供"年"和"月"通过他们应该出现的URI段
请问'next_prev_url' => 'http://localhost/zhangjs'后面怎么设置? 补充一下我点击上个月 urlhttp://localhost/zhangjs/2009/08/
下个月 urlhttp://localhost/zhangjs/2009/10/
页面报错信息为404 Page Not Found
The page you requested was not found. 本帖最后由 kazaff 于 2009-9-9 09:26 编辑
$prefs = array (
'show_next_prev'=> TRUE,
'next_prev_url' => 'http://example.com/index.php/calendar/show/'
);
$this->load->library('calendar', $prefs);
echo $this->calendar->generate($this->uri->segment(3), $this->uri->segment(4)); HEX万岁:kiss: 假设当前日期是2009年9月
'next_prev_url' => 'http://example.com/index.php/calendar/show/'
你把next_prev_url 设置成上面的形式,这时你点击上一个月按钮时的url如下:
http://example.com/index.php/calendar/show/2009/8
你是不是要建立calendar,show,2009和8的文件夹?
且你点击后跳转到控制器那个文件进行换月处理? 不需要建立文件夹吧?那后面的数字是参数。
并且,应该都是有日历类库自动处理吧?根据手册写就 OK 那为什么我点击上个月的按钮url如下
http://localhost/zhangjs/calendar/2009/08
然后页面就提示404 Page Not Found
The page you requested was not found.
我是按照手册的方法写的就是不知道为什么原因? 不知道这个问题解决了没有~~~:lol
页:
[1]