21-11-2011, 16:53
|
|
|
חבר מתאריך: 25.12.04
הודעות: 61
|
|
בעיה עם header(content-type)
שלום,
אני רוצה לייצר תמונה דרך php. בכל פעם שאני מוסיף לדף את הקוד
header(content-type: image/png)
או כל פורמט אחר jpeg / gif / png וכו' אני מקבל שגיאה (רק בפיירפוקס) שאומרת
the image at "http://xxx.com" cannot be displayed because it contains errors....
מישהו נתקל בבעיה ?
הקוד המלא הוא:
<?php
$image = imagecreate(200,200);
$background = imagecolorallocate($image,255,255,255);
imagepng($image);
header("Content-type: image/png");
?>
|