Consider the following function:
function redirect($url) {
// Check to make sure we haven't already sent
// the header:
if (/*???????*/) {
header("Location: $url");
}
}
What conditional should replace the ????? above?
!in_array("Location: $url", headers_list())
Correct:
!in_array("Location: $url", headers_list())