When I'm using php header function I'm getting an error like this,
Cannot modify header information - headers already sent 
I know i should use ob_start(); at the beginning of the code for rid this error and I used too but nevertheless I'm getting error, Please tell me where I'm going wrong? This is my code where I'm getting error.
function insert_charset_header() { 
header('Content-Type: text/html; charset=UTF-8'); 
exit; 
} 
Thanks in advance
 
     
    