Sering banget lupa kalau mau disable notices sama warning di CI.. maklum newbie. Jadi posting saja deh, kali aja bermanfaat buat newbie yang lain, ya minimal buat diri sendiri lah. 😀
– Cara 1: di settingan xampp nya.
D:\xampp\apache\bin\php.ini
error_reporting = E_ALL & ~E_NOTICE
; Print out errors (as a part of the output). For production web sites,
; you’re strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = Off=====================================================================
– Cara 2: di local/aplikasi nya.
D:\xampp\htdocs\hosting\index.php
if (defined(‘ENVIRONMENT’))
{
switch (ENVIRONMENT)
{
case ‘development’:
//error_reporting(E_ALL);
//error_reporting(E_NOTICE, E_WARNING);
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
ini_set(‘display_errors’, 0);
break;case ‘testing’:
case ‘production’:
error_reporting(0);
break;default:
exit(‘The application environment is not set correctly.’);
}
}