Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple code, but image not displaying? i get this error...

Status
Not open for further replies.

VitoCorleone

Programmer
Jun 22, 2004
28
GB
Hi,

I have the following code to display an image in PHP

<?php

// get a file name
$file='eclipse.jpg';
// check it is a jpeg file
if(exif_imagetype($file) == IMAGETYPE_JPEG) {

$exif = exif_read_data($file,"COMPUTED,IFD0", TRUE);


print ("Picture taken {$exif['IFD0']['DateTime']} ".
"with a {$exif['IFD0']['Make']} " .
"{$exif['IFD0']['Model']} " .
"<br>");
}

else {
print ('Wrong image type');
}
?>

But having the image in my root folder which is diplaying the page via my local host i get the following ERROR message:

Fatal error: Call to undefined function exif_imagetype() in c:\wamp\ on line 17

On line 17 isif(exif_imagetype($file) == IMAGETYPE_JPEG) {

I installed WAMP5 which has Apache, MyPHP and MySQL already configures. Can anyone help?
 
Do you have any idea how i go about this?

I read the lik but it makes no sense! you can tell that im used to the automated world of dreamweaver. Im taking a leap into the hand coding world.]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top