You should never store sensitive credentials in your code. Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments, such as database credentials or credentials for 3rd party services, should be extracted from the code into environment variables. Basically, a .env file is an easy way to load custom configuration variables that your application needs without having to modify .htaccess files or Apache/nginx virtual hosts. This means you won't have to edit any files outside the project, and all the environment variables are always set no matter how you run your project, Apache, Nginx, CLI, and even PHP's built-in webserver. It's WAY easier than all the other ways you know of to set environment variables, and you're going to love it!

Features

  • No editing virtual hosts in Apache or Nginx
  • No adding php_value flags to .htaccess files
  • Easy portability and sharing of required ENV values
  • Compatible with PHP's built-in web server and CLI runner
  • PHP dotenv is a PHP version of the original Ruby dotenv
  • Installation is super-easy via Composer

Project Samples

Project Activity

See All Activity >

License

BSD License

Follow PHP dotenv

PHP dotenv Web Site

Other Useful Business Software
Skillfully - The future of skills based hiring Icon
Skillfully - The future of skills based hiring

Realistic Workplace Simulations that Show Applicant Skills in Action

Skillfully transforms hiring through AI-powered skill simulations that show you how candidates actually perform before you hire them. Our platform helps companies cut through AI-generated resumes and rehearsed interviews by validating real capabilities in action. Through dynamic job specific simulations and skill-based assessments, companies like Bloomberg and McKinsey have cut screening time by 50% while dramatically improving hire quality.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of PHP dotenv!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Security Software, PHP Source Code Analysis Tool

Registered

2021-05-20