Jayram121 Posted November 12, 2013 Share Posted November 12, 2013 if (!isset($_SESSION['user'])) { header("Location: login.php"); ob_end_clean(); exit; } Do I need to use ob_end_clean(); and exit(); to gether. I could not understand of the purpose of ob_end_clean(); Quote Link to comment https://forums.phpfreaks.com/topic/283837-use-of-ob_end_clean-and-exit/ Share on other sites More sharing options...
requinix Posted November 12, 2013 Share Posted November 12, 2013 1. No. 2. ob_end_clean If you have output buffering enabled then this will end one of them (not all, in case you have more than one active) without outputting anything. Quote Link to comment https://forums.phpfreaks.com/topic/283837-use-of-ob_end_clean-and-exit/#findComment-1457990 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.