0

ここに画像の説明を入力Web アプリケーション ( PHP ) でキャプチャを作成しようとしていますが、画像がレンダリングされません。そこで、php.net の簡単な例である次のコードを試してみました。しかし、これも画像をレンダリングしません。wamp2.2でphp 5.3を使用しています

// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5,  'A Simple Text String', $text_color);

// Set the content type header - in this case image/jpeg
header('Content-Type: image/jpeg');

// Output the image
imagejpeg($im);

// Free up memory
imagedestroy($im);
4

1 に答える 1