I am having some trouble with conflicting headers in Wordpress and a QR Code class that I am trying to use. I am a bit lost on how headers operate even, so I'm sure that is part of the problem. Basically this class uses the following code to print the QR Code:
However, upon trying to use the header tag, I am getting the following error due to Wordpress:Code:header("Content-type: image/png"); print $img; return true;
Due to the following area in the header.php of Wordpress:Warning: Cannot modify header information - headers already sent by (output started at /home/bgmh1986/public_html/site/wp-content/themes/toolbox/header.php:13) in /home/bgmh1986/public_html/site/wp-content/themes/toolbox/php/BarcodeQR.php on line 86
I have tried putting the header call from the barcode in this area, but it just prints out a bunch of random characters (as I assume it's uncertain of the media type it is trying to display). How would I go about modifying the headers at this point down the page? Thanks.Code:<!--[if IE 6]> <html id="ie6" <?php language_attributes(); ?>> <![endif]--> <!--[if IE 7]> <html id="ie7" <?php language_attributes(); ?>> <![endif]--> <!--[if IE 8]> <html id="ie8" <?php language_attributes(); ?>> <![endif]--> <!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!--> <html <?php language_attributes(); ?>> <!--<![endif]--> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width" />



Reply With Quote

Bookmarks