Ich brauche etwas ähnlich der folgenden in meinem CodeIgniter Projekt zu erstellen: -Wie Laden von Konfigurationsdateien in CodeIgniter?
my_config.php
config_production.php
config_development.php
Nun wird my_config.php
automatisch geladen werden. Von dort wird, wenn es sich um Produktionsserver handelt, config_production.php
geladen; sonst wird config_development.php
geladen.
Wie soll ich das ausführen?
Ich habe nach dem in my_config.php
versuchte dabei:
<?php
if(gethostbyaddr ("127.0.0.1") == 'hello.sabya'){
$this->config->load('config_production');
} else {
$this->config->load('config_development');
}
?>
Es wird nicht als $this->config
Arbeits initialisiert nicht. Wie kann ich das erreichen?
+1 genau. Ich habe so etwas gemacht und es hat funktioniert. – Sabya