Posts

Showing posts with the label CodeIgniter

CodeIgniter Interview Questions

CodeIgniter is an open-source MVC based framework for PHP. It is a loosely coupled framework that we can use for the rapid development of websites and mobile APIs. 1) How to check the version of the CodeIgniter framework? In system/core/CodeIgniter.php, check CI_VERSION constant value define(‘CI_VERSION’, ‘3.0.6’); 2) How to set CSRF token in CodeIgniter? CSRF is used to set the protection in CodeIgniter. To set CSRF, you have to put the corresponding config value True. Syntax: $config['csrf_protection'] = TRUE; 3) How many types of messages you can log in to CodeIgniter? There are three message types in Codeigniter. They are : Error Messages. These are actual errors, such as PHP errors or user errors. Debug Messages. These are messages that assist in debugging. For example, if a class has been initialized, you could log this as debugging info. Informational Messages. These are the lowest priority messages, simply giving information regarding some process.