How to use headers_sent() function to check whether header have been sent or not in PHP

1 Answer

0 votes
if (!headers_sent()) 
{
    header('Location: http://www.collectivesolver.com/');
    exit;
}

   
/*
run: 

open collectivesolver.com

*/

 



answered May 11, 2016 by avibootz

Related questions

1 answer 178 views
4 answers 236 views
2 answers 261 views
1 answer 168 views
...