‹ Articles

How to Set Environment Variables

Some PHP applications look for configuration data in environment variables. You can set environment variables for your app using .htaccess files.

Either create or modify the file called .htaccess in your web root directory (public) and add the following lines:

SetEnv MYVAR myvalue
SetEnv OTHERVAR othervalue

You can use as many SetEnv directives as you need.

Still Have Questions?

Don't hesitate to contact us if you can't find the answers to your questions.