I am working on software with PHP, the project folder is called "sge"
, where I have subfolders called "controlador"
, and inside this, I have a database configuration file called "csBDDCon.php"
in the root, and inside "controlador"
I have two folders called "usuario"
and "login"
, in the I need the "include('csBDDCon.php');"
to be able to call that database connection in each of these files, but when I do it, it gives me an error, I'm trying this way:
include ("../sge/csBDDCon.php");
And also in this other way: include("../controlador/csBDDCon.php");
, this, inside my file in the path:controlador/login/csLogin.php
Thank you in advance for your help.
how are you?
If the subfolders in which you have the files in which you have to include the configuration file, are inside "controller" , you just have to skip a directory and include it from there.
sge/controller/login/csLogin.php
Cheers!