If I got you right, you are calling the
require_once('/Application/Rules/required_file.class.php');
within the file
? That does not work because require_once
always relates to the current folder, as long as you do not use absolute paths.
Instead you need to call
require_once('../../Application/Rules/required_file.class.php');
because the file you want to include is not in the same folder as your file
.
../
goes back one folder in the hierarchy.
../../
therefore goes back from /Users
to /Public
and then to /Project
, form where you then can go to /Application
.
I think this article might explain the difference between relative and absolute paths quite well.
The relative path points to a file or directory in relation to where the present file is located.
The absolute path is the "full path" from the webserver point of view. It is the path that contains the document root. For example /var/www/mydomain.com/.