PHP JPEG Functions Not Working
问题 Any PHP functions that deal with JPEGs don't seem to be working on my server. This code: <?php $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); header('Content-type: image/jpeg'); imagejpeg($im); imagedestroy($im); ?> creates an empty file. Using a GIF or PNG function will create an image containing the text "A Simple Text String" as expected. This: $im = imagecreatefromjpeg("test.jpg");