我正在尝试使用 writeHTML 脚本(此处: http ://www.fpdf.org/en/script/script41.php )以及教程 6 中的页眉和页脚(此处:http://www.fpdf .org/en/tutorial/tuto2.htm)。
我的代码如下所示:
<?php
require_once('WriteHTML.php');
class PDF extends FPDF
{
// Page footer
function Footer()
{
$this->SetY(-30);
$this->SetFont('Arial','I',8);
$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
$html = '<p>some HTML</p>';
$this->WriteHTML($html);
}
// Some more functions... header, PrintChapter etc...
}
$pdf = new PDF();
$pdf->SetTitle($title);
$pdf->AddPage();
$pdf->PrintChapter(1,'A RUNAWAY REEF','test.txt'); // print text file content
$pdf->Output();
?>
我收到以下错误:
Call to undefined method PDF::WriteHTML() in /path/to/test2.php on line 15
我在这里想念什么?