php - Should I call exit() after calling Location: header?

ackeith

New Member
After calling the redirect function header, should I call exit or not?\[code\]<?php // fileA$urlFailToGoTo = '/formerror.php';if (sth){ header(sprintf("Location: %s", $urlFailToGoTo)); exit(); //should I call exit() here? or return?}?>\[/code\]Thank you
 
Back
Top