php - Random <br /> tag appearing, no idea why -


this question has answer here:

this not duplicate, question br tag, not 'headers sent' error.

i have php redirect setup redirect users not logged in login page, creating "cannot modify header information" error because reason
on line 1 of source code (when viewing source in browser) have no idea why!

the source code index.php below:

<br /> <b>warning</b>:  cannot modify header information - headers sent (output started @ /home/webuser/public_html/beta/admin/index.php:1) in        <b>/home/webuser/public_html/beta/admin/inc/header.php</b> on line <b>3</b>     <br /> 

the code index.php below, deleted except below page ensure wasn't on page.:

<? include "inc/header.php"; ?> 

the code header.php below, deleted except below page ensure wasn't on page.:

  <?   if ($login == 0) {   header ("location:login?error[]=you must login view page!");   }   ?> 

as can see, br tag isn't anywhere on header.php or index.php have no idea coming from. weirder, header.php included in other pages , not experience issue. plus, once logged in, issue isn't there , br tag doesn't exist.

any ideas?

edit: have deleted index.php page , had following:

<?php header("location:login?error[]=you must login view page!"); ?> 

issue still occurs. no idea why. created new page , done exact same, issue didn't occur.

edit 2: issue resolved. no idea was, copied content of index.php, deleted file, created new index.php, pasted content in , error did not occur. weird indeed.

try remove , code, or html or space above,

 <?php   if ($login == 0) {   header ("location:login?error[]=you must login view page!");   }  ?> 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -