I have a plain(no framework) php app. I want to deploy my app to PhpFog.
The problem is the config(host,dbname) is different.
How to create a db config for development and production environment?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use environment variables to do this. PHPFog provides a way to set environment variables in the App Console > Env. Variables tab for your app.
Simply create all the environment variables that you need on both your local machine and on the App Console:
Example:
Local Machine: Edit your .bash_profile
PHPfog App Console:
Then access them from your php app: