Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/09/2009, 15:28
HaX
 
Fecha de Ingreso: octubre-2007
Mensajes: 34
Antigüedad: 16 años, 6 meses
Puntos: 0
Ayuda con el header

Hola a todos, tengo problemas con el error Cannot modify header information - headers already sent by. he leido en la web las distintas soluciones, pero ninguna me funciona!
Bueno, tengo q crear un pdf a partir de una arreglo de datos, esto se ejecuta al precionar el boton exportar pdf. aca pego el codigo!!

ayuda pls!
Código PHP:
    function btn_genera_pdf(){

        
$arreglo_de_logs $this->so_logs->informe_logs();
        
        if(
$_POST['btn_exporta']){
               if(
$arreglo_de_logs != null){

            
$titles = array(
                
'id'=>'<b>Codigo</b>',
                
'accion'=>'<b>Accion</b>',
                
'url'=>'<b>Direccion</b>',
                
'fecha'=>'<b>Fecha</b>');
            
                       
$options = array(
                            
'shadeCol'=>array(0.9,0.9,0.9),
                            
'xOrientation'=>'center',
                            
'width'=>500
                        
);
            
$txttit "<b>Probando!!!</b>\n";
            
//$pdf->ezImage('pato.jpeg', 0,100, 'none');

            
$this->pdf->ezStartPageNumbers(300,20,15,'','',1);
            
//$this->pdf->addJpegFromFile("pato.jpeg",50,760,100);

            
$this->pdf->ezText("\n\n\n"5);
            
$this->pdf->ezText($txttit18, array('justification' => 'centre'));
            
$this->pdf->ezText("\n\n\n"5);
            
$this->pdf->addText(330,800,10,"Fecha: ".date("d/m/Y"));
            
$this->pdf->addText(480,800,10,"-".date("H:i")."\n\n");
            
//$pdf->setLineStyle(1);

            //$pdf->line(50,720,550,720);

            
$this->pdf->ezTable($logs$titles,'ejemplo'$options);
            
$this->pdf->ezText("\n\n\n"10);
            
$this->pdf->ezStream();
             }
       }

las solcuiones que he intentado son, sacar espacion, caracteres, raros, etc. tambien con el ob_start, ademas con session_start(), pero no resulta nada, eso si q lo leido todos dice q la solucione seria el header, pero tampoco me funciona :(

pd: sorry por la tabulacion de las llaves :(

ayuda pls!