How to initialize a driver in codeigniter?



How to initialize a driver in codeigniter?..

Answer / Piyush Tiwari

To initialize a driver in CodeIgniter, you typically configure it in your application/config/database.php file and then use the $db object to connect to the database. Here's an example for MySQL: $db['default'] = array('dsn' => '', 'hostname' => 'localhost', 'username' => 'your_username', 'password' => 'your_password', 'database' => 'your_database');

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CodeIgniter Interview Questions

How can you enable csrf?

1 Answers  


How do I do a count('foo') using the active record functions?

1 Answers  


How to set or get config variables in codeigniter?

1 Answers  


What is load in codeigniter?

1 Answers  


How do I call one model's methods from a different model?

1 Answers  


How can you load multiple helper files?

1 Answers  


Explain codeigniter’s application flow chart?

1 Answers  


How to get file name in controller codeigniter

1 Answers  


How do you use aliases with autoloading models in codeigniter?

1 Answers  


What is inhibitor in codeigniter?

1 Answers  


What is the use of $this in codeigniter?

1 Answers  


Explain codeigniter architecture?

1 Answers  


Categories