請問一下大家,我的網頁上為何會出現致命錯誤???
代碼如下:
<?php
$src = "001.jpg";
$info = getimagesize($src);
$type = image_type_to_extension($info[2],false);
$fun = "imagecreatefrom($type)";
$image = $fun($src);
$font = "msyh.ttf";
$content = "你好,慕課";
$col = imagecolorallocatealpha($image,255,255,255,50);
imagettftext($image,20,0,20,30,$col,$font,$content);
header("Content-type:".$info['mime']);
$func = "image($type)";
$func($image);
?>
網頁上顯示
Fatal error: Call to undefined function imagecreatefrom(jpeg)() in?D:\PHP\XAMPP\htdocs\image\fontmark.php?on line?6
就是$image = $fun($src);這一行出問題了。。