• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom ENVIRONMENT name

#1
Hi.

I'm trying to use a custom ENVIRONMENT name like 'potato'

but when I define this name

index.php > 
PHP Code:
define('ENVIRONMENT''potato'); 


I create the folder 'potato' on the config folder

application > config > potato > config.php

And I get this message "The application environment is not set correctly."

If I change to 'testing' or 'development' it works ok.

It's not allowed to create custom development names?

Thanks.
Reply

#2
@alfaex,

According to the documentation ( https://codeigniter.com/user_guide/libra...vironments ) you should be able to name it whatever you choose. What version of CI are you using?

Also, is the permissions of the sub folder and the sub folder config file set correctly?
Reply

#3
(02-18-2019, 06:34 PM)php_rocs Wrote: @alfaex,

According to the documentation ( https://codeigniter.com/user_guide/libra...vironments ) you should be able to name it whatever you choose.  What version of CI are you using?  

Also, is the permissions of the sub folder and the sub folder config file set correctly?

I found the answer later.

there a few lines above that if is not one of those 3, it exits

https://github.com/bcit-ci/CodeIgniter/b...ex.php#L66

so I added my custom "word" to the switch

This is not explained in the documentation.

Thanks.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.