Monday, 2 September 2013

Best debug tool to debug Ajax request in PHP

Best debug tool to debug Ajax request in PHP

What is the best debug tool to debug AJAX request in PHP? I want to check
whether the method in the class.php has been fired when the AJAX function
is calling.
Eg:
$.ajax({
url: 'classes/MyClass.php/GetItems',
data: {
'catgry': cat
},
dataType: 'json',
success: function (data) {
alert("data recived!");
},
error: function (jqxhr, textStatus, errorThrown) {
alert("error");
}
});
MyClass.php
public function GetItems($catgry) {
$ret = $itmObj->GetItemsByCat($catgry);
return $ret;
}

No comments:

Post a Comment