Skip to content

Instantly share code, notes, and snippets.

@ziadoz
Created September 10, 2012 16:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ziadoz/3691980 to your computer and use it in GitHub Desktop.
Save ziadoz/3691980 to your computer and use it in GitHub Desktop.
PHP and Apache Environment Configuration
<?php
define('ENV', getenv('ENV') !== false ? getenv('ENV') : 'development');
/* OR */
define('ENV', isset($_SERVER['ENV']) ? $_SERVER['ENV'] : 'development');
<VirtualHost *:80>
SetEnv ENV production
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment