Html does not load with php include_once ()

0

I'm trying to run a php file inside the html, I get the file alone but when I call it by include_once () in html the page just does not load.

HTML

<div class="input-field col s4 m3">
        <select name="estado" id="id_estados" class="browser-default" >
            <option value="" selected="selected">Escolha o estado:</option>
            <?php include_once("../CRUD/Chamadas/listarEstados.php"); ?>
        </select>
    </div>

PHP

 <?php  
    include_once("../DAO/dalLocalizacao.php");

    $dalLocalizacao = new dalLocalizacao();
    $estados = $dalLocalizacao->listarEstado();

    while($estado = mysqli_fetch_array($estados))
    {
        $item = $estado['Nome'];
        $uf = $estado['Uf'];
        $item = utf8_encode($item);
        echo '<option  value="'.$uf.'">'.$item.'</option>';
    }
?>  

PHP2

<?php
include_once("../Classes/classLocalizacao.php");
include_once("../Classes/classConexao.php");
public function listarEstado()
    {
     $query = "SELECT * FROM Estado";
     $estados = $this->conexao->query($query) or die(mysql_error());
     return $estados;
    }
?>

Folder structure

    
asked by anonymous 23.09.2018 / 17:02

0 answers