3
I have the following folder structure.
classificados
index.php
login.php
-->config
-->conecta.php
-->funcoes
-->banco-usuario.php
-->headers
-->cabecalho.php
-->menu.php
-->rodape.php
-->front
-->painel.php
-->outrasPaginas.php
If I include the code in the.php panel file like thisrequire_once("../headers/cabecalho.php");
goes from the error always, because the.php header file that is in the headers folder, calls the menu file, then the panel.php file does not find the menu, wanted to do it the right way, as I do it?
Can someone help me?
use the absolute path, avoid going back var/www/html/headers/menu.php is not the best way to do this, use some Fw to take care of those details for you
– Isvaldo Fernandes
Have you ever thought about MVC?
– Guilherme Nascimento
Already Herme, but I haven’t learned yet, so I’m doing as it gives hehehe
– Eduardo Paludo
Use a framework, adopt XYZ architecture... often we don’t need it. For learning purposes I think the path of stones is super valid.
– gmsantos