Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> phplot headers already sent..., problem w klasie phplot
pit501
post
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 2.11.2005

Ostrzeżenie: (0%)
-----


Mam problem z wyswietlaniem wykresów w klasie phplot ale tylko wtedy jeżeli prócz danego wykresu maja zostać wyświetlone jakies wartosci ,przytaczam przykład kodu:
  1. <?php
  2.  
  3. for ($i = 0; $i < 10; $i++)
  4. {
  5. $data[$i] = array("200" . $i, rand());
  6. //echo 'Klucz = ' . $data[$i][0] . '<br>Wartosc = ' . $data[$i][1] . '<br>';<-o tym mowa
  7. }
  8.  
  9.  
  10.  
  11. function plot($data)/////////////////////////////////////////////////////
  12. {
  13. //Include the code
  14. include("../phplot.php");
  15.  
  16. //Define the object
  17. $graph = new PHPlot(600,500);
  18.  
  19. $graph->SetDataValues($data);
  20.  
  21. $graph->SetPlotType("bars");
  22.  
  23. //Draw it
  24. $graph->DrawGraph();
  25. }//////////////////////////////////////////////////////////////////////////
  26.  
  27. plot($data);
  28.  
  29.  
  30.  
  31. ?>


chodzi o drugą linijke w petli for jak jest za znakami komentarza jest wszystko ok
a to jest wyrzucane:

Klucz = 2000
Wartosc = 16177
Klucz = 2001
Wartosc = 1558
Klucz = 2002
Wartosc = 31639
Klucz = 2003
Wartosc = 20868
Klucz = 2004
Wartosc = 7533
Klucz = 2005
Wartosc = 28066
Klucz = 2006
Wartosc = 14899
Klucz = 2007
Wartosc = 496
Klucz = 2008
Wartosc = 9065
Klucz = 2009
Wartosc = 16878

Warning: Cannot modify header information - headers already sent by (output started at c:\usr\apache\httpd\html\examples\p1.php:6) in c:\usr\apache\httpd\html\phplot.php on line 1090

Warning: Cannot modify header information - headers already sent by (output started at c:\usr\apache\httpd\html\examples\p1.php:6) in c:\usr\apache\httpd\html\phplot.php on line 1091

Warning: Cannot modify header information - headers already sent by (output started at c:\usr\apache\httpd\html\examples\p1.php:6) in c:\usr\apache\httpd\html\phplot.php on line 1092

Warning: Cannot modify header information - headers already sent by (output started at c:\usr\apache\httpd\html\examples\p1.php:6) in c:\usr\apache\httpd\html\phplot.php on line 1093

Warning: Cannot modify header information - headers already sent by (output started at c:\usr\apache\httpd\html\examples\p1.php:6) in c:\usr\apache\httpd\html\phplot.php on line 1099
�PNG 

i jakies krzaki... (IMG:http://forum.php.pl/style_emoticons/default/worriedsmiley.gif) (IMG:http://forum.php.pl/style_emoticons/default/worriedsmiley.gif) (IMG:http://forum.php.pl/style_emoticons/default/worriedsmiley.gif) (IMG:http://forum.php.pl/style_emoticons/default/worriedsmiley.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 1.01.2026 - 12:21