需要使用php根据表的id将数据库中的图像显示到fpdf文档中
我的数据库中的图像表名为pendaftaran,图像变量名为upload_foto。 但是当我使用下面的脚本时,图像不会显示在文档中需要使用php根据表的id将数据库中的图像显示到fpdf文档中,php,database,image,display,fpdf,Php,Database,Image,Display,Fpdf,我的数据库中的图像表名为pendaftaran,图像变量名为upload_foto。 但是当我使用下面的脚本时,图像不会显示在文档中 <?php session_start(); include '../../koneksi/koneksi.php'; include 'fpdf/Code39.php'; $rows = $_GET['Id']; $query = "SELECT * FROM pendaftaran WHERE Id = $rows"; $e
<?php
session_start();
include '../../koneksi/koneksi.php';
include 'fpdf/Code39.php';
$rows = $_GET['Id'];
$query = "SELECT * FROM pendaftaran WHERE Id = $rows";
$exec = mysqli_query($conn, $query);
$data = array();
while ($row = mysqli_fetch_array($exec)) {
$data[] = $row;
}
$pdf = new PDF_Code39();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->Image('images/pas_cetak.png', 10, 10,180, 100);
$pdf->SetFont('Times','',12);
$nomor = 1;
$pdf->SetFont('Times','',18);
$pdf->SetXY(40, 33);
$pdf->cell(80, 7, substr(strtoupper($data[0]['tanggal_pendaftaran']), 0, 20), 0, 4, 'L'); // for this the data can display properly
$pdf->SetXY(15, 99);
$pdf->SetFont('Times','',30);
$pdf->cell(80, 7, substr(strtoupper($data[0]['upload_foto']), 0, 20), 0, 4, 'L'); // for this cell the image not display
$pdf->Ln(10);
$pdf->Output();
?>