ch3co2h | Salut, j'ai un petit probleme, j'ai un script qui génère une image contenant un caractere dedans voici mon code :
Code :
- <?php
- $im = imagecreate(100, 100);
- $string = 'PHP';
- $bg = imagecolorallocate($im, 255, 255, 255);
- $black = imagecolorallocate($im, 0, 0, 0);
- // affiche un "P" noir dans le coin de gauche en haut
- imagechar($im, 1, 0, 0, $string, $black);
- header('Content-type: image/png');
- imagepng($im);
- ?>
|
Mais au lieu d'afficher l'image ca m'affiche:
Code :
- ?PNG IHDRd(úVBpPLTEÿÿÿ"5Iá?À?ȤûÓ÷y©?jÿüîIêâeIDATx?í?;À C?äÝÿ²å'µ,%?n?,¡<?3?Ø?\?²DI$??ɾF¬¼k?Ï&xCÜÑ?oV?ºBj??@ áÑe??^vÛêbj??1?H|u??ô{dÿ¿¶t?躧BIEND®B`?
|
Donc c'est koi le probleme ? NB: le script marche quand je le teste tout seul mais dès que je l'intègre à mon code principal ca marche pas...
merci de votre aide
|