angular.js:14525 Error: [$http:baddata]

I had a error

angular.js:14525 Error: [$http:baddata]

Any one Can Help??

if (isset($_GET['do'])) {
  $do = $_GET['do'];
  print_r($do);
  switch ($do) {
    case 'check':
      $this - > check();
      break;
    case 'getusers':
      $data = getusers();
      echo $data;
      break;
  }
}

function getusers() {
  global $con;
  $query = "SELECT * FROM follow WHERE followby=1";
  $result = mysqli_query($con, $query);
  $rows = array();
  while ($r = mysqli_fetch_assoc($result)) {
    $rows[] = $r;
  }
  print_r($rows);
  return json_encode($rows);
  //return json_encode($rows);
  //I tried here also echo
}

php

$http({
  method: 'GET',
  headers: {
    'Content-Type': 'application/json'
  },
  url: 'libs/factory.php?do=getusers'
}).then(function(response) {
  $scope.temp = angular.fromJson(response);
  console.log($scope.temp);
});