Uczę się PHP5, mam zainstalowanego Krasnala, obecnie jestem na etapie poznawania skryptów tworzących grafikę. I tu jest mały problem: przy uruchamianiu skryptu, wyskakuje komunikat:
Warning: Cannot modify header information - headers already sent by (output started at c:usrapachehttpdhtmlcwphplinie.php:9) in c:usrapachehttpdhtmlcwphplinie.php on line 10
To jest ten skrypt:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html"> </head> <body> <? $rysunek = imagecreate (100,100); $kolorbialy = imagecolorallocate ($rysunek, 255, 255, 255); $kolorczarny = imagecolorallocate ($rysunek, 0, 0, 0); imagefill ($rysunek, 0, 0, $kolorczarny); for ($i=1; $i<10; $i++) { imageline ($rysunek, 10*$i, 0, 10*$i, 100, $kolorbialy); imageline ($rysunek, 0, 10*$i, 100, 10*$i, $kolorbialy); } for ($x=0; $x<10; $x++) { for ($y=0; $y<10; $y++) { imagefill ($rysunek, 5+$x*10, 5+$y*0, $kolorlosowy); } } imagepng ($rysunek); ?> </body> </html>
Opuszczałem też html, ale to nic nie dało. Moze ktośma jakis pomysł?