PHP coding problem
-
I’m receiving an error message:
Warning: Cannot modify header information – headers already sent by (output started at /home/izacacom/public_html/blog/wp-content/themes/Izaca_blog/functions.php:11) in /home/izacacom/public_html/blog/wp-includes/pluggable.php on line 39
…when I go to my blog with the www in the url (http://www.izaca.com/blog), but it works correctly when the ‘www.’ is taken out (http://izaca.com/blog). The PHP code that its referring to is below, but I don’t know how to fix it.
if ( !function_exists('wp_redirect') ) : function wp_redirect($location, $status = 302) { global $is_IIS; $location = apply_filters('wp_redirect', $location, $status); if ( !$location ) // allows the wp_redirect filter to cancel a redirect return false; $location = wp_sanitize_redirect($location); if ( $is_IIS ) { header("Refresh: 0;url=$location"); } else { if ( php_sapi_name() != 'cgi-fcgi' ) status_header($status); // This causes problems on IIS and some FastCGI setups header("Location: $location");
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘PHP coding problem’ is closed to new replies.