 |
|
Code (PHP)
ob_start();
$img_r = imagecreatefromjpeg($src);
$dst_r = ImageCreateTrueColor($targ_w, $targ_h);
imagecopyresampled($dst_r, $img_r, 0, 0, $x, $y, $targ_w, $targ_h, $w, $h);
flush();
ob_flush();
header('Content-type: image/jpeg');
imagejpeg($dst_r, null, $jpeg_quality);
ImageJPEG($dst_r, $src_new);
ImageDestroy($img_r);
ImageDestroy($dst_r);
ผมใช้โค้ดนี้แล้วมันขึ้น Warning: Cannot modify header information - headers already sent in XXX หมายถึงอะไรครับ พอมีวิธีอื่นที่ส่งแทน header('Content-type: image/jpeg'); มั้ยครับ
----------------------------------------------
ขอบคุณครับ 
Tag : PHP, MySQL, HTML/CSS, JavaScript, jQuery, Windows
|
|
 |
 |
 |
 |
Date :
2014-07-31 13:43:04 |
By :
chudjane_th |
View :
771 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |