can't get my headers and footers working with my image :(
Moderator: General Moderators
can't get my headers and footers working with my image :(
any ideas
i have this code at the bottom of my show_poll.php page
PHP:
--------------------------------------------------------------------------------
<?
ob_start();
Header('Content-type: image/png');
ImagePng($im);
ImageDestroy($im);
include ('../includes/header.html');
include ('../includes/footer.html');
ob_end_flush();
?>
--------------------------------------------------------------------------------
but only can see the graph for making my online poll and can't see any of the header or footer files, wondered if someone could help
i have this code at the bottom of my show_poll.php page
PHP:
--------------------------------------------------------------------------------
<?
ob_start();
Header('Content-type: image/png');
ImagePng($im);
ImageDestroy($im);
include ('../includes/header.html');
include ('../includes/footer.html');
ob_end_flush();
?>
--------------------------------------------------------------------------------
but only can see the graph for making my online poll and can't see any of the header or footer files, wondered if someone could help
Try:
The problem is you were trying to mix .html stuff with the image. That's not what you want. If you want to include an image in an HTML file, you use an img tag like this
Code: Select all
<?
ob_start();
Header('Content-type: image/png');
ImagePng($im);
ImageDestroy($im);
ob_end_flush();
?>Code: Select all
<img src="path/to/imagescript.php" />Dont bother Jason, this user cannot test something that is allready bounced as idea to him.JAM from other thread wrote:Code: Select all
<?php // image.php is holding the header() and other info of the above picture include ('../includes/header.html'); ?> <img src="image.php"> <?php include ('../includes/footer.html'); ?>