我在 image_creator 中有图像创建代码。
<?php
header("Content-Type: image/jpeg");
$im = ImageCreateFromGif("photo.gif");
$black = ImageColorAllocate($im, 255, 255, 255);
$start_x = 10;
$start_y = 20;
Imagettftext($im, 12, 0, $start_x, $start_y, $black, 'verdana.ttf', "text to write");
Imagejpeg($im, '', 100);
ImageDestroy($im);
?>
图像输出文件为 image.php,代码如下
<html>
<head>
</head>
<body>
<img src="http://localhost/image_creator.php"/>
</body>
</html>
当我运行 image.php 时,我只是得到一个空白页。为什么会这样?