I have a project with the following structure:
.credentials
helpers.php
home.php
admin\
login.php
register.php
In the helpers.php, i'm trying to get the content of .credentials by doing file_get_contents('.credentials'), but this works only if the then i include that file in file in the same directory (for example home.php), but when I try to do something like:
include('../helpers.php');
in the admin/login.php file, it no longer works, because helpers.php tries to find admin/.credentials
How can i avoid this behavior