
Originally Posted by
JuzJoJo
Now It's showing this.. but I don't know what's wrong with line 45
[13-Nov-2013 21:07:24 America/Chicago] PHP Warning: Cannot modify header information - headers already sent by (output started at /home4/joan2011/public_html/includes/classes/observers/class.send_extra_email_at_welcome.php:1) in /home4/joan2011/public_html/includes/functions/functions_general.php on line 45
/**
* Redirect to another page or site
* @param string The url to redirect to
*/
function zen_redirect($url, $httpResponseCode = '') {
global $request_type;
// Are we loading an SSL page?
if ( (ENABLE_SSL == 'true') && ($request_type == 'SSL') ) {
// yes, but a NONSSL url was supplied
if (substr($url, 0, strlen(HTTP_SERVER . DIR_WS_CATALOG)) == HTTP_SERVER . DIR_WS_CATALOG) {
// So, change it to SSL, based on site's configuration for SSL
$url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_CATALOG));
}
}
// clean up URL before executing it
while (strstr($url, '&&')) $url = str_replace('&&', '&', $url);
while (strstr($url, '&&')) $url = str_replace('&&', '&', $url);
// header locates should not have the & in the address it breaks things
while (strstr($url, '&')) $url = str_replace('&', '&', $url);
if ($httpResponseCode == '') {
header('Location: ' . $url);
session_write_close();
} else {
header('Location: ' . $url, TRUE, (int)$httpResponseCode);
session_write_close();
}
exit();
}
Bookmarks