datatable中ajaxSource问题
天云 2013-01-27 11:06:13 背景:
网站用的是yii框架,其中有用到datatable实现分页显示,yii中设置的urlManager:path
问题:
ajaxSource中的内容是:http://www.zahm123.com/bin/index.php/tree/main/getNews/
最后生成请求的URL是:http://www.zahm123.com/bin/index.php/tree/main/getNews/?sEcho=1&iColumns=2&sColumns=&iDisplayStart=0&iDisplayLength=6
大家可以发现这两个位置的URL方式不一样,前一个是path方式,后面用的是get方式,网页中无法加载这个ajax请求,如果把url改成:http://www.zahm123.com/bin/index.php/tree/main/getNews/sEcho/1/iColumns/2/iDisplayStart/0/iDisplayLength/6就可以正常访问
请问各位大神,如何解决datatable请求?