<?php
header("Content-type: image/gif");
$image=imagecreatefromgif("images/2.gif");
$text_color=imagecolorallocate($image,137,153,68);
$text=$_GET['content'];
imagefttext($image,15,0,245,80,$text_color,"font/sher.ttf",$_GET['id']);
imagefttext($image,15,0,245,125,$text_color,"font/sher.ttf",$text);
imagepng($image);
imagedestroy($image);
?>
上面是源代码是生成带有文字的图片的代码,其中美中不足的是,假如一行很长的文字超过了一幅图的范围,被超过的文字将会自动裁掉。请问GD库如何给一行文字自动换行?我如何修改以上的代码?