Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/08/2011, 20:10
diegonazho
 
Fecha de Ingreso: enero-2009
Mensajes: 142
Antigüedad: 15 años, 4 meses
Puntos: 1
Exclamación phplot-grafico

Hola buenas tengo una duda, tengo un codigo con el cual hago un grafico con phplot.php el cual funciona bien ejecutando el script de forma local, pero al momento de subirlo al servidor este no funciona y ya no se como resolver esto si me pueden ayudar este es el codigo
index.php
Código PHP:
Ver original
  1. <?php
  2. $uno =6;
  3. $dos=3;
  4. $tres=9;
  5. ?>
  6. <html>
  7. <head>
  8. <title>Hello, PHPlot!</title>
  9. </head>
  10. <body>
  11. <h1>PHPlot Test</h1>
  12. <img src="simpleplot.php?uno=<?php echo $uno;?>&dos=<?php echo $dos;?>&tres=<?php echo $tres;?>">
  13.  
  14. </body>
  15. </html>


Código PHP:
Ver original
  1. <?php
  2. require_once 'phplot.php';
  3.  
  4. $locales=$_GET['uno'];
  5. $ldn=$_GET['dos'];
  6. $moviles=$_GET['tres'];
  7.  
  8.  
  9. $data = array(
  10.   array('Locales', $locales),
  11.   array('LDN', $ldn),
  12.   array('Moviles', $moviles),
  13.     );
  14.  
  15. $plot = new PHPlot(470,300);
  16. $plot->SetImageBorderType('plain');
  17. $plot->SetDataType('text-data-single');
  18. $plot->SetDataValues($data);
  19. $plot->SetPlotType('pie');
  20.  
  21. $colors = array('blue', 'red','green');
  22. $plot->SetDataColors($colors);
  23. foreach ($data as $row)
  24. $plot->SetLegend(implode(': ', $row));
  25. $plot->SetShading(0);
  26. $plot->SetLabelScalePosition(0.2);
  27. $plot->DrawGraph();
  28.  
  29.  
  30. ?>

bueno eso es