Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm developing a website. I have two environments: DEV and REAL. Each of them have a config.php to store database configuration and something.

When I modify something in DEV's config.php and upload to REAL for production, I don't want to modify user and password in REAL's config.php.

For example:

DEV's config.php
user: abc
password: abc
// something below for development

REAL's config.php
user: xyz
password: xyz
// something below for production

If I modify "something below" in DEV's config.php and upload to REAL, I don't want to modify user and password from "abc" to "xyz". Any solutions?

share|improve this question

1 Answer 1

Include another file with the relevant parts that you don't upload.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.