-1
I’m creating a website, and all my functions that I use on it are in a file called Funct.php
.
So when I have to use some function, I have to call these files using the request Funct.php
and, depending on the folder I’m in, I have to add "../".
I observed the laravel framework and he has a file .ENV
where have the variables of connection with the database, so these variables are considered "superglobal" such as the post
or get
.
For this reason I wanted to know how to create a variable superglobal so that I can call anywhere without the need to use the Request
You mean
require
? Laravel uses this: https://github.com/vlucas/phpdotenv– bfavaretto