您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

jqgrid+php应用问题

2026/1/1 8:22:44发布21次查看
jqgrid有post动作到服务端,php文件里有写echo json_encode数据,数据post格式是json,用firebug查看,没有json数据返回,请问是什么原因呢
回复讨论(解决方案) 页面:
nbsp;html public -//w3c//dtd xhtml 1.0 transitional//en http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd>
测试。。。。
程序:
page = 1;
$responce->total = 1;
$responce->records = 1;
$responce->rows[0]['id'] = 1;
$responce->rows[0]['cell'] = array ('20130606','testdate...');
echo json_encode($responce);
?> 控制台下看报什么错误了
程序改为以下:
$responce[page] = 1;
$responce[total] = 1;
$responce[records] = 1;
$responce[rows][0][cell] = array (sn=>20130606,title=>testdate...);
echo json_encode($responce);
用firebug可以看到有json数据返回,但在页面上为什么还是显示不了呢
没有报任何错误。。。,是不是还要引用什么包呢
把$responce->rows[0]['cell'] = array ('20130606','testdate...');
改为$responce->rows[0] = array ('20130606','testdate...');
就可以了
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product