代码正在本地服务器上运行,但当它在cpanel中托管时,它会返回一个空响应。 。这是因为代码吗?或者是规则,还是因为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);
?>