jeg fatter det ikke
Jeg har et script jeg bruger når jeg skal uploade billeder, men nu er det virkelig begyndt at drille og jeg fatter ikke lige fejlen:her er scriptet
<?php session_start(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>IndSæt picture</title>
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data">
<table width="464" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="138" height="22" valign="top">Event Navn </td>
<td colspan="3" valign="top"><input name="event" type="text" id="event"></td>
</tr>
<tr>
<td height="24" valign="top">Billde</td>
<td colspan="3" valign="top"><input name="fil" type="file" id="fil" ></td>
</tr>
<tr>
<td height="19" colspan="4" valign="top">Billede tekst</td>
</tr>
<tr>
<td height="170" colspan="4" valign="top"><textarea name="text" cols="60" rows="9" id="text"></textarea></td>
</tr>
<tr>
<td height="29"> </td>
<td width="197"> </td>
<td width="65" valign="top"><input name="Submit" type="submit" id="Submit" value="Indsæt"> </td>
<td width="64" valign="top"><input type="reset" name="Reset" value="Slet"></td>
</tr>
</table>
</form>
<?php
if($_POST['Submit'])
{
include_once('../Connection/conn.php');
$src=$_FILES['fil']['tmp_name'];
$ext=strtolower(end(explode(".",$_FILES['fil']['name'])));
$event=$_POST['event'];
$text=$_POST['text'];
$tid= time();
$nytNavn = "image-" . $tid . "." . $ext;
$dst = "billeder/". $nytNavn;
copy($src, $dst );
$image = $dst;
if(file_exists($image)) {
$foto = 1;
$imgsize = getimagesize($image);
if($imgsize[0] > 117) {
$width = 117;
$height = $imgsize[1] / ($imgsize[0] / 117);
$dst_img = imagecreatetruecolor($width, $height);
$scr_img=imagecreatefromjpeg($image);
imagecopyresized($dst_img,$scr_img,0,0,0,0,$width,$height,$imgsize[0],$imgsize[1]);
imagejpeg ($dst_img, "../tunering3/thumbnail/" . $nytNavn);
} else {
$src_img= imagecreatefromjpeg("$image");
ImageJpeg($scr_img, $dst);
};
$imgurl = "../billeder/thumbnail/" . $nytNavn;
} else {
$foto = 0;
};
echo ('billedet er uploadet');
}
?>
</html>
Når jeg så prøver at uploade billede kommer denne her fejl:
Call to undefined function: imagecreatetruecolor() in C:\Inetpub\wwwroot\teameasyrun\admin\insertpicture.php on line 71
Hvad kan det være?
