php display errors
Open the "index.php" file in the root directory of your CodeIgniter application.
Locate the following line of code:
php define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
Change the value of the 'ENVIRONMENT' constant to 'development' to enable error display:
php define('ENVIRONMENT', 'development');
Find the following code block in the same "index.php" file: ```php if (defined('ENVIRONMENT')) { switch (ENVIRONMENT) { case 'development': error_reporting(-1); ini_set('display_errors', 1); break;
case 'testing': case 'production': ini_set('display_errors', 0); if (version_compare(PHP_VERSION, '5.3', '>=')) { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); } else { error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); } break; default: exit('The application environment is not set correctly.');
} } ```
Ensure that the 'development' case is configured to display errors:
php case 'development': error_reporting(-1); ini_set('display_errors', 1); break;
Save the changes to the "index.php" file.
Refresh your CodeIgniter application in the web browser to see the displayed errors.