I created a php project like this:
- img
- js
- php
- config
- config.php
- pages
- news.php
- contact.php
- config
I need to include my config.php
into all my files news.php
, contact.php
How to avoid to have a relative path like ../config/config
?
I would like to have a root path like php/config/config.php
.
I use MAMP Pro. Should I use an environment variable to save the root path?