net :: ERR_EMPTY_RESPONSE как решить - PullRequest
0 голосов
/ 28 сентября 2018

мой AJAX-код, указанный ниже

, дает ошибку типа

net :: ERR_EMPTY_RESPONSE

как решить ошибку

setInterval(function(){
    $.ajax({
        url:'count_noti.php',
        type:'POST',
        data:{log_user_noti:'<?php echo $_COOKIE['log_id'];?>' },
        success:function(get_counts){
            console.log(get_counts);
            $('#count_noti').html(get_counts);
            $('#count_noti2').html(get_counts);
        }
    });
},1000);  

серверный код

<?php include'conn.php';?>

<?php
    $count_noti="select id,count(*) as cnts 
                from notification 
                where uploader_id in (
                        select accepter from friends 
                        where follower='".$_POST['log_user_noti']."'
                        ) 
                and seen='unseen' 
                or uploader_id in (
                        select follower 
                        from friends 
                        where accepter='".$_POST['log_user_noti']."'
                        ) 
                and seen='unseen' ";
    $count_noti_q=mysqli_query($con,$count_noti);
    while($get_count=mysqli_fetch_array($count_noti_q)):
        echo $get_count['cnts'];
    endwhile;
?>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...