#safe_redirect: rediriger une page sans erreur headers already sent # function safe_redirect($url=none){ if (!$url){return false;} if (!headers_sent()){header('location: '.$url);} else{echo '<script>document.location.href="'.$url.'";</script>';} exit; }