I have the following tree of directories:
.var
..|--www
......|--site
..........|--index.php
..........|--all
..............|--controller
..................|--conexao.php (classe)
..............|--model
..................|--bo
..................|--vo
..................|--dao
.....................|--prioridade_dao.php (classe)
Beauty quite extensive, the problem is as follows: It includes the class_of.php priority within index.php (so far so good) if I "NO" put any include in the priority_of.php appear things when viewing the page, now if I put any include in the class priority_dao.php does not appear nothing more. Already tried:
include ('../../controller/conexao.php');
include '../../controller/conexao.php';
include ("../../controller/conexao.php");
include "../../controller/conexao.php";
include $_SERVER['DOCUMENT_ROOT']."/all/controller/conexao.php";
Next class class.php:
<?php
Class PrioridadeDao{
error_reporting(-1);
ini_set('display_errors', 'On');
include $_SERVER['DOCUMENT_ROOT']."/all/controller/conexao.php";
$conexao = new Conexao();
public function __construct(){
}
public function teste(){
echo "Chega aqui sim";
}
public function selectAll(){
echo "<br />CHEGA AQUI?";
if(!$conexao->conecta()){
exit;
} else {
$result = pg_query($conexao->conecta(), "SELECT * FROM prioridade");
while ($consulta = @pg_fetch_array($result)){
echo $consulta['nivel']." ".$consulta['nome'];
}
$conexaoObj->encerra($conexao->conecta());
}
}
}
?>
I have also tried with Require, all to no avail. I made a test calling by direct include the conexao.php
in the index.php
and I was able to do it. I'm using __construct()
empty methods in classes, can this be? Anyway I have already researched a lot of places, tested many things and nothing :( if you can help me I will be very grateful.