安全验证码图像不显示在000webhost


security captcha image not dispalyiing in 000webhost

我已经在000webhost上上传了我的网站,但在我的注册表单中,安全验证码图像在我的localhost中显示时没有显示。

我的验证码是:
<?php
include_once('includes/session.php');
$_SESSION['secure']=rand(1000,9999);
header('content-type:image/jpeg');
$text=$_SESSION['secure'];
$font_size=25;
$image_width=200;
$image_height=40;
$image=imagecreate($image_width,$image_height);
imagecolorallocate($image,255,255,255);
$text_color=imagecolorallocate($image,0,0,0);
for($x=1;$x<=40;$x++)
{$x1=rand(1,120);
$x2=rand(1,120);
$y1=rand(1,120);
$y2=rand(1,120);
imageline($image,$x1,$y1,$x2,$y2,$text_color);    
}
imagettftext($image,$font_size,0,15,30,$text_color,'MAGNETOB.TTF',$text);
imagejpeg($image);
?>

我将验证码显示为:

<img src="captcha1.php" id="captcha" />

我的代码有什么问题?

您是否激活了GD扩展?