私はイメージにいくつかのヘッダを追加し、いくつかのコードを持っている:タイトルbackground.png.phpの500の内部サーバエラーを返すPHPイメージ?
内容:
<?php
$im = imagecreatefrompng("title-background.png");
header('Cache-Control: public');
header('Content-type: image/png');
header('Expires: 19 Febuary 2012 20:00:00 GMT');
imagepng($im);
imagedestroy($im);
?>
そして、それが正常に動作していますが。私は、別のファイルにbutton.png.phpの
内容同じことをしようとしたとき、しかし:500 で
<?php
$im1 = imagecreatefrompng("button.png");
header('Cache-Control: public');
header('Content-type: image/png');
header('Expires: 19 Febuary 2012 20:00:00 GMT');
imagepng($im1);
imagedestroy($im1);
?>
サーバーのリターンを私は私のログにアクセスできません。
画像のパスを確認しましたか?ファイルにアクセスできますか? – 0x60
これらの行をファイルの先頭に追加して、500エラーを防止してから、PHPエラーが発生するかどうかを確認してください。 '<?php error_reporting(E_ALL); ini_set( 'display_errors'、 'on');エコー "aaa"; ob_flush(); ?> ' –