ローカルホストで FPDI をセットアップしたいのですが、エラーが発生します。
Fatal error: Class 'FPDF' not found in C:\wamp\www\book\fpdf_tpl.php on line 20
これが私がしたことです:ダウンロードページ
に行き、2つのパック (FPDF_TPL と FPDI) をダウンロードし、ローカルホストに解凍しました。
次に、サンプルページを作成しました:
<?php
require_once('fpdf.php');
require_once('fpdi.php');
// initiate FPDI
$pdf = new FPDI();
// add a page
$pdf->AddPage();
// set the source file
$pdf->setSourceFile("PdfDocument.pdf");
// import page 1
$tplIdx = $pdf->importPage(1);
// use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 10, 10, 100);
// now write some text above the imported page
$pdf->SetFont('Helvetica');
$pdf->SetTextColor(255, 0, 0);
$pdf->SetXY(30, 30);
$pdf->Write(0, 'This is just a simple text');
pdf->Output();
私はサイトが言うことをしましたが、エラーがありました:
Fatal error: Class 'FPDF' not found in C:\wamp\www\book\fpdf_tpl.php on line 20
エラーコードを検索しましたが、わかりません。
FPDIの経験者はいますか?