0
My code is this, but in php code I do not receive the ref parameter... What can be ?
$http({
method: 'POST',
url: '../assets/php/client/PHP.php',
data: {ref: 'dataTableLoad'}
}).then(function (response) {// on success
//alert(response.data);
console.log(response.data);
$('#dataTableTboody').html(response.data);},
function (response) {
console.log(response.data,response.status);
});
if (isset($_POST['ref']) && $_POST['ref'] != '') {
init($_POST['ref']);
} else {
$data['response'] = -1;
echo json_encode($data);
exit;
}
Run a test to see if it’s not coming in the input stream with
file_get_contents('php://input')
, if you are just use json_decode to return the input– Antonio