0
我使用FPDFFPDF錯誤無法重新聲明類FPDF
Cannot redeclare class FPDF in /home/www/etrackbureau.co.za/fpdf.php on line 12
當我不在代碼
<?php
//include_once('diag.php');
include_once('mysql_table.php');
include_once('../../fpdf.php');
class PDF extends PDF_MySQL_Table
{
function Header()
{
//Title
$this->SetFont('Arial','',18);
$this->Cell(0,6,'World populations',0,1,'C');
$this->Ln(10);
//Ensure table header is output
parent::Header();
}
}
//Connect to database
mysql_connect('localhost','stingin_assist','trevor74');
mysql_select_db('stingin_assist');
$pdf=new PDF();
$pdf->AddPage();
//First table: put all columns automatically
$pdf->Table('select * from bureau order by rep_date');
$pdf->AddPage();
//Second table: specify 3 columns
$pdf->AddCol('rank',20,'','C');
$pdf->AddCol('name',40,'Country');
$pdf->AddCol('pop',40,'Pop (2001)','R');
$prop=array('HeaderColor'=>array(255,150,100),
'color1'=>array(210,245,255),
'color2'=>array(255,255,210),
'padding'=>2);
$pdf->Table('select name, format(pop,0) as pop, rank from country order by rank limit 0,10',$prop);
$pdf->Output();
?>
我聲明之類的任何其他部分聲明其他類收到以下錯誤據我所知只有一次。由於我是新來FPDF第二個問題是最好讓它創建圖表的PDF文件和寫作。我已經搜索了論壇,並提到了很多。我要尋找一個基線PDF系統寫入來自信息報告了我的數據庫,並將其放置到圖表