Welcome Guest, Not a member yet? Register   Sign In
Setting Database Config Items
#1

[eluser]Kyle Ellman[/eluser]
I'm wanting to make an install script for an application. The script should completely set up the database, without the user having to access config/database.php at all.

I know that codeigniter config items can be set using
Code:
$this->config->set_item('item_name', 'item_value');

Is this possible with database config items? I haven't been able to so far, nor can I find an answer to this.

Thanks.
#2

[eluser]skunkbad[/eluser]
That's only for run-time configuration. You'll probably have to fread, fwrite, and all that good stuff on the config file itself. Either that, or you might do like Wordpress. Have the user type in their DB info, test the connection, and then generate a config file download that they drop in place.
#3

[eluser]$ilovephp[/eluser]
file handling is the answer...




Theme © iAndrew 2016 - Forum software by © MyBB