My problem is the following one I have an index.php file which has a login that sends the information "controller / login.php" which has inside these two require_once
require_once 'conx/Db.php';
require_once '../libs/Security.php';
the root of the files is as follows:
index.php
dashboard.php
controller/
|---->conx/Db.php
|---->login.php
libs/
|---->Security.php
What happens, when I login in the system, it enters perfectly but when I get to dashboad.php
, it sends me this error:
Warning: require_once(../libs/Security.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\internacionalPeritaciones\controller\login.php on line 4
What I do not understand is that before entering dashboard.php
it works perfectly but when I login it sends me that error and both index and dashboard files are in the same folder. I tried using:
require_once(dirname(__FILE__) . '/libs/Security.php';
------ por separado
$root = $_SERVER['DOCUMENT_ROOT'];
require_once $root . '/libs/Security.php';
None of those worked for me, I'm really a bit lost. They are grateful for the help.