How do I configure CakePHP to detect my development / production environments or do I just keep the config files out of version control? -


"itemprop =" text ">

I am a panic developer, but I currently have a project where I can not tweak the server for CakePHP Working with In my Rail production server, the passenger is automatically setup to use the "production" environment, overriding the local app setup. I would like to setup my own cakepip app to do the same thing. How do you usually complete with KPPHP? Do you set up a domain parser, or do you keep database.php out of core.fp and version control? Thanks in advance, David

If I understand the question correctly, this may be needed:

In short, DATABASE_CONFIG Creator:

  class DATABASE_CONFIG {// initalize Null on $ default form In variable = zero; // Set the connection details to be used in the live production server var $ prod = array (// ...); // Testing and development on your local machine for more details var $ dev = array (// ...); Function __construct (if {isset ($ _ server ['SERVER_NAME'])) {switch ($ _ server ['SERVER_NAME']) {case 'digbiz.localhost' $ this- & gt; Default = $ this- & gt; God ; break; Case 'digbiz.example.com' $ this- & gt; Default = $ this- & gt; Prod; break; }} Rest / We are making prospects, our local database {$ this- used & gt; Default = $ this- & gt; God; }}}  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -