请问一下大家,我的网页上为何会出现致命错误啊?
代码如下:
<?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);这一行出问题了。。