
24-02-2007, 00:16
|
|
|
|
חבר מתאריך: 23.08.06
הודעות: 89
|
|
|
תמונה דינאמית
שלום
אני רוצה לשים תמונה דינאמית בעמוד.
מה עשיתי לא בסדר?
קוד PHP:
<?php $font_number = 6; $text = "yaniv123"; $width = 2 * strlen($text) * imagefontwidth($font_number); $height = 3 * imagefontheight($font_number); $image = imageCreate ($width, $height); $back_color = imageColorAllocate ($image, 200, 200, 200); $drawing_color = imageColorAllocate ($image, 0, 0, 0); $x_position = ($width - (strlen($text) * imagefontwidth($font_number))) / 2; $y_position = ($height - imagefontheight($font_number)) / 2; imagestring ($image, $font_number, $x_position, $y_position, $text, $drawing_color); imagejpeg ($image, "img.jpg"); imageDestroy ($image); echo "<html> <body> <div style='text-align:center;'><img src='img.jpg' /></div> </body> </html>"; ?>
Warning: imagejpeg() [function.imagejpeg]: Unable to open 'img.jpg' for writing in /home/*******/domains/*********.co.il/public_html/*********.php on line 12
תודה מראש
יניב
|