Dynadot โ€” .com Registration $8.99

[Php] Text to image

Spaceship Spaceship
Watch

dcgamers

Established Member
Impact
1
PHP:
<?
header ("Content-type: image/pjpeg");
$string = "[copyright] 2007";
$im = ImageCreateFromjpeg($imm);
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 255, 255,255);//black text
imagettftext ($im, "12", "0", 10, 20, $text_color, "verdana.ttf", $string);
imageinterlace($im, 1);
imagejpeg($im);
?>
I'm tring to add text to an image and It works and shows the image but now I want it to save the image. I thought that imagejpeg() does that automatically but it didn't. I need help here.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
0
•••
Ok, I did that and the page with the function just shows the url of the page itself and under view source it says that it was unable to open the file (yes it's 777) any idea whats the problem?

found the problem, now I have another. When I add images to my server, I want them to get this text. In order to do that, they need to be CHModed to 777. I can do that on a script but safemode is active. How can I disable safemode?
 
0
•••
dcgamers said:
Ok, I did that and the page with the function just shows the url of the page itself and under view source it says that it was unable to open the file (yes it's 777) any idea whats the problem?

found the problem, now I have another. When I add images to my server, I want them to get this text. In order to do that, they need to be CHModed to 777. I can do that on a script but safemode is active. How can I disable safemode?

I'm not sure if you can disable safemode :( http://uk.php.net/features.safe-mode I'm presuming you're on shared hosting.
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back