Answers for "session_start(): cannot start session when headers already sent"

PHP
1

session_start(): cannot start session when headers already sent

// FIRST line of each php file using session (no character before)
<?php if ( empty(session_id()) ) session_start(); ?>
// Encode in ANSI or UTF8 (No BOM !)
Posted by: Guest on March-16-2021

Code answers related to "session_start(): cannot start session when headers already sent"

Browse Popular Code Answers by Language