Error loading php page on online site

Asked

Viewed 55 times

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

  • Don’t come in either, I already tested.

  • You’re using door 80?

  • Have some antivirus installed ?

  • The way to db.class.php is correct on the server?

  • The path is correct yes, this file is in the same folder as the database connection.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.