0
I did the whole site on my computer testing with the shamp. But when I went online, some problems appeared when loading 3 pages of access to the bank that are similar.
<?php
require_once('db.class.php');
$objdb = new db();
$link = $objdb->conecta_mysql();
$sql = "SELECT DISTINCT categoria FROM produtos ORDER BY categoria";
if($resultado = mysqli_query($link, $sql)){
if($resultado->num_rows > 0){
while($linha = mysqli_fetch_assoc($resultado)){
$vetor[] = $linha;
}
echo json_encode($vetor);
}else{
echo json_encode('');
}
}else{
echo json_encode("errobanco");
}
?>
The following error appears in the browser:
Failed to load resource: net::ERR_EMPTY_RESPONSE crud/carregar_cat.php:1
NOTE: I am using a free host to test.
By cell phone, it enters normal? Using 4G
– Marcelo Shiniti Uchimura
Don’t come in either, I already tested.
– Trimander
You’re using door 80?
– Marcelo Shiniti Uchimura
Have some antivirus installed ?
– NoobSaibot
The way to
db.class.php
is correct on the server?– Pedro Henrique
The path is correct yes, this file is in the same folder as the database connection.
– Trimander