How can I change DB settings while the App is running |
Hello Everyone,
I want to change the default database settings while the application is running. I define as PHP Code: config('Database')->default['hostname'] = $this->DBHost; in App/Libraries/Company.php How i use? I define it PHP Code: $this->COMPANY = new Company(); in BaseController. I'm getting this error. Quote:CodeIgniter\Database\Exceptions\DatabaseException #8 If used like this: PHP Code: config('Database')->default['hostname'] = 'localhost'; there is no problem It gives an error when I define it in the library How can i solve this?
Are you sure that username and password are correct? Check DBUser and DBPass if you get correct values.
He needs to set the MySQLi password.
Code: // Shell from Control Panel or CMD - change your_password to yours. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |