I have the following on my htaccess.
SetEnv APPLICATION_ENV development
When I pass this file to prodution, I will change it to:
SetEnv APPLICATION_ENV production
This
development
and
production
are set on Zend Framework application.ini correct ?
How does Zend and Apache communicate here? How does Zend knows about that htaccess instruction?
Thanks.
SetEnv, used in Apache’s configuration (be it a .htaccess file, or a VirtualHost), defines an environment variable.From PHP, you can read environment variables either :
getenv()function.$_SERVERor$_ENVsuperglobal variablesTaking a look at the given `index.php` in [Zend Frameworks QuickStart][4], you’ll see it uses that environment variable the define the PHP constant called `APPLICATION_ENV` :
And that constant is later used to initialize the application :