Dopo aver chiamato l'intestazione della funzione di reindirizzamento, devo chiamare l'uscita o no?php - Devo chiamare exit() dopo aver chiamato Location: header?
<?php // fileA
$urlFailToGoTo = '/formerror.php';
if (sth)
{
header(sprintf("Location: %s", $urlFailToGoTo));
exit(); //should I call exit() here? or return?
}
?>
si
possibile duplicato di [Perché devo chiamare 'esci' dopo il reindirizzamento attraverso l'intestazione ('Posizione ...') in PHP?] (http://stackoverflow.com/questions/2747791/why-i-have-to-call- exit-after-redirection-through-headerlocation-in-php) –