JQuery POST aynı isteği çalışmaz ile

0 Cevap php

i bir sonraki sorun var

$("#btnsave").click(function () {
    $.post('svld.php', {
        'fnd': $('#fnd').attr("value")
    }, function (data) {
        alert(data);
    }, 'json');
}

slvd.php

header('Content-type: application/json');

    var_dump(json_encode($_POST));

istek i sonraki görmek

fnd http://ya.ru

ve büyük tepki var

string(24) "{"fnd":"http:\/\/ya.ru"}"

ama alert (data) runed değil

i aynı klasöre dosya parse.php üzerinde aynı isteği yaparsanız

if($_POST['fnd']){

 header('Content-type: application/json');
 echo json_encode($cntTags->returnArrayTags());
}

all work perfect Have idea what it can be ?

başlık listesi

Date Thu, 08 Jul 2010 12:16:02 GMT
Server Apache/2.2.14 (Win32) PHP/5.3.0
X-Powered-By PHP/5.3.0
Content-Length 38
Keep-Alive timeout=5, max=99
Connection Keep-Alive
Content-Type application/json
Host localhost
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept application/json, text/javascript, */*
Accept-Language ru,en-us;q=0.7,en;q=0.3
Accept-Encoding gzip,deflate
Accept-Charset windows-1251,utf-8;q=0.7,*;q=0.7
Keep-Alive 115
Connection keep-alive
Content-Type application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With XMLHttpRequest
Referer http://localhost/tz/
Content-Length 22
Cookie spylog_test=1

0 Cevap