Setting Database Configuration in CodeIgniter?

Setting Database Configurations in Codeigniter very tiny task , just open database.php within applicationconfig. Set config like below , here database user “root”, password “”(no password), DB Name “db_name”.

if you want to disable persistent connnect just change $db['default']['pconnect'] = TRUE; to $db['default']['pconnect'] = FALSE;

if you want to Hide(disable) Database Error just change $db['default']['db_debug'] = TRUE; to $db['default']['db_debug'] = FALSE;

just like above changes to the configuration values you can change any of the DB config values(settings) any time to the config array.

Here the sample database.php script

I hope this tutorial helps you please don’t forget to give us your feedback in comments.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
DMCA.com Protection Status
0
Would love your thoughts, please comment.x
()
x