Foros del Web » Programando para Internet » PHP »

Ayuda con JPGRAPH

Estas en el tema de Ayuda con JPGRAPH en el foro de PHP en Foros del Web. Estaba usando el JPGRAPH, pero a la hora de mezclarlo con mis scripts, me sale lo siguiente: JpGraph Error: HTTP headers have already been sent. ...
  #1 (permalink)  
Antiguo 11/06/2007, 15:48
 
Fecha de Ingreso: junio-2007
Mensajes: 56
Antigüedad: 16 años, 10 meses
Puntos: 0
Ayuda con JPGRAPH

Estaba usando el JPGRAPH, pero a la hora de mezclarlo con mis scripts, me sale lo siguiente:
JpGraph Error: HTTP headers have already been sent.
Caused by output from file template.php at line 10.
Explanation:
HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it's image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).
Most likely you have some text in your script before the call to Graph::Stroke(). If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.

For example it is a common mistake to leave a blank line before the opening "<?php".

y este es mi código de template.php
<?php
if (!defined('WEB_ROOT')) {
exit;
}

$self = WEB_ROOT . 'admin/index.php';
?>
<html>
<head>
<title><?php echo $pageTitle; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="<?php echo WEB_ROOT;?>admin/include/admin.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="<?php echo WEB_ROOT;?>library/common.js"></script>
<?php
$n = count($script);
for ($i = 0; $i < $n; $i++) {
if ($script[$i] != '') {
echo '<script language="JavaScript" type="text/javascript" src="' . WEB_ROOT. 'admin/library/' . $script[$i]. '"></script>';
}
}
$Uname = $_SESSION['Uname'];
?>
</head>
<body>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="1" class="graybox">
<tr>
<td colspan="2"><img src="<?php echo WEB_ROOT; ?>admin/include/banner-top2.gif" width="750" height="75"></td>
</tr>
<tr>
<td width="150" valign="top" class="navArea"><p>&nbsp;</p> Bienvenido <?php echo $Uname; ?>
<a href="<?php echo WEB_ROOT; ?>admin/" class="leftnav">Home</a>
<a href="<?php echo WEB_ROOT; ?>admin/pedido/" class="leftnav">Formatos</a>
<a href="<?php echo WEB_ROOT; ?>admin/product/" class="leftnav"></a>
<a href="<?php echo WEB_ROOT; ?>admin/order/?status=Paid" class="leftnav"></a>
<a href="<?php echo WEB_ROOT; ?>admin/config/" class="leftnav"></a>
<a href="<?php echo WEB_ROOT; ?>admin/user/" class="leftnav">Usuario</a>
<a href="<?php echo $self; ?>?logout" class="leftnav">Logout</a>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p></td>
<td width="600" valign="top" class="contentArea"><table width="100%" border="0" cellspacing="0" cellpadding="20">
<tr>
<td>
<?php
require_once $content;
?>
</td>
</tr>
</table></td>
</tr>
</table>
<p>&nbsp;</p>

</body>
</html>

¿Alguien sabe como solucionarlo?
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 08:25.