Mengatasi Cannot modify header information - headers already sent by Exceptions.php - CI 3.1.9

Berikut cara mengatasi error Cannot modify header information - headers already sent by Exceptions.php pada Exceptions.php - CI 3.1.9

ERROR lengkap:

A PHP Error was encountered
Severity: Notice

Message: Trying to get property 'no_pendaftaran' of non-object

Filename: controllers/Pendaftaran.php

Line Number: 99

Backtrace:

File: /home/usercPanel/public_html/magangrudi/application/controllers/Pendaftaran.php
Line: 99
Function: _error_handler

File: /home/usercPanel/public_html/magangrudi/index.php
Line: 315
Function: require_once

A PHP Error was encountered
Severity: Notice

Message: Undefined index: no_kk

Filename: controllers/Pendaftaran.php

Line Number: 106

Backtrace:

File: /home/usercPanel/public_html/magangrudi/application/controllers/Pendaftaran.php
Line: 106
Function: _error_handler

File: /home/usercPanel/public_html/magangrudi/index.php
Line: 315
Function: require_once

A PHP Error was encountered
Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/usercPanel/public_html/magangrudi/system/core/Exceptions.php:271)

Filename: helpers/url_helper.php

Line Number: 564

Backtrace:

File: /home/usercPanel/public_html/magangrudi/application/controllers/Pendaftaran.php
Line: 191
Function: redirect

File: /home/usercPanel/public_html/magangrudi/index.php
Line: 315
Function: require_once


CARA MENGATASI:

1. Edit file system/core/Exceptions.php
2. Tambahkan kode dibawah ini pada baris paling atas

<?php ob_start() ?>
3. Simpan

Post a Comment