Utilizzando questo codice
Codice PHP:
define('FPDF_FONTPATH','/font/');
require(
'fpdf.php');
class 
PDF extends FPDF
{
//Simple table
function BasicTable($header,$data)
{
    
//Header
    
foreach($header as $col)
        
$this->Cell(40,7,$col,1);
    
$this->Ln();
    
//Data
    
foreach($data as $row)
    {
        foreach(
$row as $col)
            
$this->Cell(40,6,$col,1);
        
$this->Ln();
    }
}
}
$query "SELECT * FROM log_visite";
$result mysql_query($query);
$result mysql_query($query);
while(
$row mysql_fetch_assoc($result)){
  
$array[] = $row;
$data $array;}
$pdf = new PDF();
$header=array('ID','Browser e SO','IP','Errore','Data','Ora','Provenienza','Nazione');
$pdf->AddPage();
$pdf->BasicTable($header,$data);
$pdf->Output();
    } 
mi da questo errore "file does not begin with '%pdf-'", cosa posso fare?
VVoVe: