|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not yet rated by the users||Total: 55 ||All time: 10,342 This week: 170|
This class can parse dotenv configuration files and assign values.
It takes the path of a given file in dotenv format and parses it to extract the configuration values.
The class can also assign the configuration values to the respective environment variables and PHP constant values.
|dotenv is a file format that defines configuration variables for customizing details of operation in the environment that an application is running on.
This package can parse dotenv files to extract and assign environment configuration variables that PHP applications can access using the $_ENV or the $_SERVER superglobal array variables or the getenv function.
Orbisius Dot Env is a free php class that allows you to read .env project files.
It is just one file and doesn't have any dependencies.
If the file is not passed the class will try to look for .env starting from Document Root, then checking if WordPress' const ABSPATH is defined and try one level up.
The class is very efficient and doesn't currently use regular expressions at all.
When it parses the key names are automatically uppercases them.
It can define the values in environment, $_ENV, $_SERVER etc. and also define php constants if they haven't been defined just yet.
This class was created by https://orbisius.com
Check the example.php file.
$dot_env = Orbisius_Dot_Env::getInstance();
$data = $dot_env->read();
You can comment your
.env file using the
# character. E.g.
# You can have comments
db_name = orbisius_db
db_user = orbisius_user
db_pass = orbisius_pass # you can have a comment here too
# Leave some lines blank
api_url = https://my-cool-saas-app.orbisius.com
author_url = https://orbisius.com
author_product_1_url = https://qsandbox.com
author_product_2_url = https://wpsandbox.net
author_product_3_url = https://wpdemo.net
author_product_3_url = https://go359.com
Customizations / Support
We do offer paid support & customizations.
Contact us at https://orbisius.com/contact for more info.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.