CodeIgniter Forums
Starting with CodeIgniter setup: suggestions & best practices - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Starting with CodeIgniter setup: suggestions & best practices (/showthread.php?tid=21388)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12


Starting with CodeIgniter setup: suggestions & best practices - El Forum - 07-17-2013

[eluser]quickshiftin[/eluser]
Although it's an area of contention with the core CI developers I like to make index.php configurable via environment.

Note I use Apache, but this sort of thing is typical in Zend and Symfony too. Here's what the top of my index.php files look like w/ CI:

Code:
// default to development, but look for the APPLICATION_ENV variable
// to control the environment without having a different branch per env
$sEnv = getenv('APPLICATION_ENV');
if($sEnv === false)
    define('ENVIRONMENT', $sEnv = 'development');
else
    define('ENVIRONMENT', $sEnv);

Now inside of an Apache vhost I can set the environment without having to constantly change the CI code.

Code:
SetEnv APPLICATION_ENV production



Starting with CodeIgniter setup: suggestions & best practices - El Forum - 09-06-2013

[eluser]WebMada[/eluser]
It's dated 2010 but it is still very useful.

Viva CodeIgniter!


Starting with CodeIgniter setup: suggestions & best practices - El Forum - 12-29-2013

[eluser]OwanH[/eluser]
Hi Jelmer, this is a great post. It was very thoughtful of you to put this list together and I really hope that many of us in the community, especially those new or still young to using CI can benefit from your experience thus far.

All the best in your endeavours.


Starting with CodeIgniter setup: suggestions & best practices - El Forum - 05-27-2014

[eluser]Unknown[/eluser]
so simple way, many thanks