Set content-type before sending image data for a valid response
This commit is contained in:
parent
97e0390680
commit
82d64bff96
|
@ -212,7 +212,6 @@ function drawImage($speedtest)
|
||||||
imagefttext($im, $FONT_WATERMARK_SIZE, 0, $POSITION_X_WATERMARK, $POSITION_Y_WATERMARK, $TEXT_COLOR_WATERMARK, $FONT_WATERMARK, $WATERMARK_TEXT);
|
imagefttext($im, $FONT_WATERMARK_SIZE, 0, $POSITION_X_WATERMARK, $POSITION_Y_WATERMARK, $TEXT_COLOR_WATERMARK, $FONT_WATERMARK, $WATERMARK_TEXT);
|
||||||
|
|
||||||
// send the image to the browser
|
// send the image to the browser
|
||||||
header('Content-Type: image/png');
|
|
||||||
imagepng($im);
|
imagepng($im);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,4 +220,5 @@ if (!is_array($speedtest)) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header('Content-Type: image/png');
|
||||||
drawImage($speedtest);
|
drawImage($speedtest);
|
||||||
|
|
Loading…
Reference in a new issue