Heim >Backend-Entwicklung >PHP-Tutorial >界面-PHP $ajax失败,数据类型json

界面-PHP $ajax失败,数据类型json

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-02 11:27:36815Durchsuche

ajax界面php数据库

我在文件B中,连接数据库,取出了我需要的信息,放在一个大数组里定为$list,但是在A界面ajax读取$list的值,老是显示fail;
我在B里直接输出$list,得到一组数,在不连接数据库的情况下,直接把这组数赋值给$list,这种情况在A中显示的结果是正常的;

后来我想了一个办法,用一个C页面include B页面,从C传给A.我传的是一维数组的值的时候结果是正确,但是传二维数组时,又出现了之前的那种问题,现象一模一样。这是为什么呢?

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn