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
ここで何が欠けていますか?