I'm having trouble accessing a PHP page via ajax. When I am trying to access in the access.log it gives the following error:
"POST /eglise/mobile/MOB_Acao.php HTTP / 1.1" 200 84 "-" "Mozilla / 5.0 (Linux; Android 4.4.2; XT920 Build / 3_190_2009) AppleWebKit / 537.36 (KHTML, like Gecko) Version / 4.0 Chrome / 30.0.0.0 Mobile Safari / 537.36 "
In ajax I'm doing this:
jQuery.ajax({
type: "POST",
url: w_servidor+"/MOB_Acao.php",
data: dados,
success: function( data )
{
var e = $.parseJSON(data);
console.log(e.codError == 506);
}
});
My w_server variable is var w_servidor = "http://meuip:8080/eglise/mobile";
I searched on htaccess
but it's nothing to do with what's happening. The project is mobile
, and what makes us more interesting is that mobile
works perfectly.
This request I am specifically making an inquiry, the page that receives the request is written like this:
<?php
include "MOB_PessoasBanco_class.php";
$acao = $_POST['acao'];
error_log($acao);
if ($acao == 'verificar') {
$actionExecute = new PessoasBanco($_POST, 'verificar');
echo $actionExecute->verificarPessoas();
}
if ($acao == 'cadastrar') {
$actionExecute = new PessoasBanco($_POST, 'cadastrar');
echo $actionExecute->cadastrarPessoa();
}
The page I call below searches the database as follows:
$data = $this->conexao->fetchNaoRestritivo($sql, $dataInput);
But the problem is not in this part, because when I open IntelXDK
it works perfectly, and I even did another project to test this connection and everything worked. So the problem is in my code, or in another part of the project.