?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Can't display the image when loading
Author:??(161.88.255.---)
Date:???02-16-05 23:16


//header image
$ph = imagecreatefromgif("ph.gif");
$im = imagecreatefromgif("graybar.gif");

if (function_exists("imagegif")) {
header("Content-type: image/gif");
imagegif($im);
} elseif (function_exists("imagejpeg")) {
header("Content-type: image/jpeg");
imagejpeg($im, "", 0.5);
} elseif (function_exists("imagepng")) {
header("Content-type: image/png");
imagepng($im);
} elseif (function_exists("imagewbmp")) {
header("Content-type: image/vnd.wap.wbmp");
imagewbmp($im);
} else {
die("No image support in this PHP server");
}

//main menu
function_bigmenu($btitle, $burl){
$btitle = "HOME;New-comer;Engineering;Advance";
$burl = "http://pww.index.html;New-comer;Engineering;Advance";
explode(";",$btitle);
explode(";",$burl);
list($HOME, $New-comer, $Engineering, $Advance) = $burl;
$count = array_values($btitle);
for($i = 0; $i < $count; $i++){
$bg = imagecolorallocate($im, 0, 0, 0);
if(array_values($stitle) == 0){
imagestring($im, 5, 0, 119, $stitle[$i], $bg);
}
if(array_values($stitle) != 0){
imagestring($im, 5, count($btitle[$i])*i/i+4, 119, $stitle[$i], $bg);
}
link($burl[$i],$list[$i]);
}
}

//create small menu
function_smallmenu($stitle, $surl){
$stitle = "ETS;Testing;Linking;MSC;Login;MISC";
$surl = "http://ETS;testing;linking;msc;login;misc";
explode(";", $stitle);
explode(";", $surl);
list($ETS, $Testing, $Linking, $MSC, $Login, $MISC) = $surl;
$count = array_values($stitle);
for($i = 0; $i < $count; $i++){
$white = imagecolorallocate($im, 225, 225, 225);
if(array_values($stitle) == 0){
imagestring($im, 3, 300, 84, $stitle[$i], $white);
}
if(array_values($stitle) != 0){
imagestring($im, 3, 300+count($stitle[$i])*i/i+4, 84, $stitle[$i], $white);
}
link($surl[$i],$list[$i]);
}
}

//output the image
header("Content-type: image/jpg");
imagegif($ph);
imagegif($im);

?>

?Re: Can't display the image when loading
Author:??(---.scpe.powergate.ca)
Date:???02-17-05 09:34

Can't combine both image headers and straight html output on a page...what you need to do is place all the imaage code into another page and then call it with the imiage tag



and that image.php page has all the image code needed to produce the image. Its the same as when you store an image in the db

Go to Top??|??Go to Topic??|??Threaded View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??

Provided By
Phorum