bonjour
je suis le tutoriel sur GD et au premier exemple j'ai ce probleme
le code:
l'erreur qui affiche dans le navigateur iceweasel :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 <HTML> <HEAD> <TITLE>Test</TITLE> </HEAD> <body> <?php header("Content-type: image/png"); $x = 50; $y = 100; $image = imagecreatetruecolor($x,$y); imagepng($image); imagedestroy($image); ?> <CENTER><IMG SRC="banniere2.png"> <BR> <HR SIZE=3> </CENTER><IMG SRC="travaux2.png"> </body> </html>
j'ai dans autre post qu'il ne fallait pas espace ou de retour chariot
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/index.php:12) in /usr/local/apache2/htdocs/index.php on line 18 �PNG etc...
alors j'ai fait :
ou
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 <?phpheader("Content-type: image/png"); $x = 50; $y = 100; $image = imagecreatetruecolor($x,$y); imagepng($image); imagedestroy($image); ?> Fatal error: Call to undefined function phpheader() in /usr/local/apache2/htdocs/index.php on line 12
j'ai editer phpinfo(); et il y a tous comme il faut.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <?php header("Content-type: image/png"); $x = 50; $y = 100; $image = imagecreatetruecolor($x,$y); imagepng($image); imagedestroy($image); ?> Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/index.php:12) in /usr/local/apache2/htdocs/index.php on line 12 �PNG
merci d'avance pour votre aide.
Partager