在cpanel中托管时,响应为空

时间:2018-01-28 13:54:23

标签: php cpanel

代码正在本地服务器上运行,但当它在cpanel中托管时,它会返回一个空响应。on a local server , the response. hosted on cpanel , the response is empty。这是因为代码吗?或者是规则,还是因为cpanel     

$data=array();

$q=mysqli_query($con,"SELECT a.*,a.date_added AS date_added2,a.status AS entry_status,a.added_by AS entry_provider FROM entries a WHERE a.status = 'Approved' ORDER BY a.id DESC") 
or die(mysql_error());

while ($row=mysqli_fetch_object($q)){
    $data[]=$row;
}

echo json_encode($data);

?>

0 个答案:

没有答案