The following script loads and displays an jpg image called 'children'
When I try to modify the code by inserting css styling the program crashes. After I remove all html coding and save the php program,it fails to load the picture. I am quite puzzled. I am running this on localhost(my computer).
Thanks
<?php
$imagepath="images/children.jpg";
$image=imagecreatefromjpeg($imagepath);
// get image height
$imgheight=imagesy($image);
//allocate color for image caption (white)
$color=imagecolorallocate($image, 255, 255, 255);
//Add text to image bottom
imagestring($image, 5, 100, $imgheight-50, "September 1978", $color);
header('Content-Type: image/jpeg');
imagejpeg($image);
?>

