0
votes

A PHP Error was encountered Severity: Warning

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

Filename: helpers/url_helper.php

Line Number: 564

Backtrace:

File: /home/adityanamansingh/kings.adityanamansingh.com/application/controllers/admin/Login.php Line: 34 Function: redirect

File: /home/adityanamansingh/kings.adityanamansingh.com/index.php Line: 315 Function: require_once

Why am I receiving this error in my code.

1
check if anything is printed on the Login.php or uri_helper.php e.g echo, any text typed or print .from top to bottom . - Sandeep Modak
@SandeepModak Thank You but there is no use of any echo, print_r or var_dump on either of them - Himanshu Singh

1 Answers

0
votes

It would be easy for everyone if you share your code. You can look at this one which says

The error occurs when you have started outputting anything before header redirect in PHP code. For example, check out any white spaces after or before PHP tags, HTML tags printing before starting of PHP tags or any output or debugging before the redirect function.

Also check for blank line before and after your closing php tag.

Hope it helps. Happy coding