problema con el header
Publicado por luis santos (9 intervenciones) el 07/06/2007 20:16:52
Hola que tal. Tengo la impresion de que la duda que tengo es basica. Lo que pasa es que nunk he trabajado con el header.
estoy tratando de hacer una grafica pero cuando ejecuto la pagina me sale un poco de basura. Algo asi como :
‰PNG IHDRh,aN¾ø IDATxœíÝÕðïüØÙí V²YÌê´![!°°ð ®$|pg¹„,?¯ˆ8|Eì`—*)Cì„Ê!T®²¹\Îq|‘Nò™B!9PˆddÙŠ½ gI Yýس³;;?òGk›Þîžžî™î~¯û}?E‰Ýžžž·óã;ï½~ïu¢Z‚ˆÈ‹¤èQô08ˆÈ3yÆà "ÏD䃃ˆ8ŒÚÛ1:Š«®Âš5øÜçpñžÂ#ÙÇ`:7_ÚÖoƒº!‚é}ŸÎ;HÅAœýNïÂøQ$Ò¨‚z ƒC—Ë¡TBO֯ǾrC†š'ÇÇ€Ü;·§^AþP°y¡ (8tZ‚,Y‚±zuÀF¾apDDáNÿ¿‰ŒÿíA‡®½Å"6nĺu˜??¬G¥18¤7ôOøð%ä@u2ìG-84--°d î¼×]îc“ ‰ îÂï_ÆÄ€?çGrpèÚÚ0w.î¸ë× *9apHip^Dy$ÔV‰-
tengo la impresion que es por el header pero realmente no se.
Aqui esta el codigo por si acaso
<?
# The data for the pie chart
$data = array(25, 18, 15, 12, 8, 30, 35);
# The labels for the pie chart
$labels = array("Labor", "Licenses", "Taxes", "Legal", "Insurance", "Facilities",
"Production");
# Create a PieChart object of size 360 x 300 pixels
$c = new PieChart(360, 300);
# Set the center of the pie at (180, 140) and the radius to 100 pixels
$c->setPieSize(180, 140, 100);
# Set the pie data and the pie labels
$c->setData($data, $labels);
# output the chart
header("Content-type: image/png");
print($c->makeChart2(PNG));
?>
estoy tratando de hacer una grafica pero cuando ejecuto la pagina me sale un poco de basura. Algo asi como :
‰PNG IHDRh,aN¾ø IDATxœíÝÕðïüØÙí V²YÌê´![!°°ð ®$|pg¹„,?¯ˆ8|Eì`—*)Cì„Ê!T®²¹\Îq|‘Nò™B!9PˆddÙŠ½ gI Yýس³;;?òGk›Þîžžî™î~¯û}?E‰Ýžžž·óã;ï½~ïu¢Z‚ˆÈ‹¤èQô08ˆÈ3yÆà "ÏD䃃ˆ8ŒÚÛ1:Š«®Âš5øÜçpñžÂ#ÙÇ`:7_ÚÖoƒº!‚é}ŸÎ;HÅAœýNïÂøQ$Ò¨‚z ƒC—Ë¡TBO֯ǾrC†š'ÇÇ€Ü;·§^AþP°y¡ (8tZ‚,Y‚±zuÀF¾apDDáNÿ¿‰ŒÿíA‡®½Å"6nĺu˜??¬G¥18¤7ôOøð%ä@u2ìG-84--°d î¼×]îc“ ‰ îÂï_ÆÄ€?çGrpèÚÚ0w.î¸ë× *9apHip^Dy$ÔV‰-
tengo la impresion que es por el header pero realmente no se.
Aqui esta el codigo por si acaso
<?
# The data for the pie chart
$data = array(25, 18, 15, 12, 8, 30, 35);
# The labels for the pie chart
$labels = array("Labor", "Licenses", "Taxes", "Legal", "Insurance", "Facilities",
"Production");
# Create a PieChart object of size 360 x 300 pixels
$c = new PieChart(360, 300);
# Set the center of the pie at (180, 140) and the radius to 100 pixels
$c->setPieSize(180, 140, 100);
# Set the pie data and the pie labels
$c->setData($data, $labels);
# output the chart
header("Content-type: image/png");
print($c->makeChart2(PNG));
?>
Valora esta pregunta


0