Jump to content

Howto - environment specific files in PHP


freephoneid

Recommended Posts

Hi,

    Currently my PHP code is not having environment specific property files. For e.g. a file called a.php is using production email address. So, when I deploy this file in my dev or staging environment, I've to update this file every time so that email will not be sent to actual production email id. Is there any way to make it environment specific?

  I'm thinking of creating config folder which will contain 3 sub-folders dev, stg & prod & I'll have the proprty file which will have this email variable defined. but I'm not clear of how to do this in PHP. I'm new to PHP. Can anyone guide me to resolve this issue???

 

Thnks!!

Link to comment
https://forums.phpfreaks.com/topic/118118-howto-environment-specific-files-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.