Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text status=:parsererror, error thrown:=SyntaxError: Unexpected token < in JSON at position 0
- $.ajax({
- url: 'private/ajax/get_personas.php',
- type:'GET',
- contentType: 'application/json; charset=utf-8',
- dataType:'JSON',
- success: function(data, textStatus, jqXHR) {
- alert(data);
- },
- error: function(data, textStatus, errorThrown) {
- console.log('message=:' + data + ', text status=:' + textStatus + ', error thrown:=' + errorThrown);
- }
- });
- include('private/connection.php');
- echo json_encode("hello");
- $host = "localhost";
- $user = "root";
- $pass = "12345";
- $db = "pruebas";
- $port = 3306;
- $connection = mysqli_connect($host, $user, $pass, $db, $port);
- echo json_encode($texto);
- $.ajax({
- url: 'private/ajax/get_personas.php',
- type: 'GET',
- success: function(data, textStatus, jqXHR) {
- console.log(textStatus, jqXHR, data);
- },
- error: function(data, textStatus, errorThrown) {
- console.log('message=:' + data + ', text status=:' + textStatus + ', error thrown:=' + errorThrown);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement