0
這裏是我的代碼 - >進步,report.php 數據類型LONGBLOB,API是FPDF如何在fpdf中查看longbob圖片?
$res=mysqli_query($conn,"SELECT school_logo FROM dsms_school_img");
while($row=mysqli_fetch_array($res))
{
$logo = '<img src="data:image/jpeg;base64,'.base64_encode($row['school_logo']).'"/>';
}
當我把這個$logo
在$pdf->Image($logo,10,10,188);
它表明這個錯誤:
Fatal error: Uncaught Exception: FPDF error: Image file has no extension and no type was specified: <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/4QECRXhpZgAATU0AKgAAAAgABAEPAAIAAAAGAAAAPgEQAAIAAAAPAAAARIKaAAUAAAABAAAAU4dpAAQAAAABAAAAWwAAAABDYW5vbgBDYW5vbiBFT1MgMTAwRAAAAAABAAAAoAAHgpoABQAAAAEAAACxgp0ABQAAAAEAAAC5iCcAAwAAAAIAZAAAkAMAAgAAABQAAADBkgkAAwAAAAIAEAAAkgoABQAAAAEAAADVpDQAAgAAAB0AAADdAAAAAQAAAKAAAAA4AAAACjIwMTc6MDE6MDYgMTY6MDc6MDkAAAAANwAAAAFFRi1TMTgtNTVtbSBmLzMuNS01LjYgSVMgU1RNAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8RERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIAVQB/gMBIgACEQEDEQH/xAAdAAACAgMBAQEAAAAAAAAAAAADBAIFAAEGBwgJ/8QAQhAAAQQBAwMDAgQDBgQEBgMAAQACAxEEBRIhBjFBE1FhInEHFDKBI5GhFUJiscHwCFLR4RYkM1NDcoKDkvEXY6L/xAAbAQACAwEBAQAAAAAAAAAAAAACAwABBAUGB//EADMRAAICAQQBAwIFAQgDAAAAAAABAgMRBBIhMUEFE1EiYRQycYHw0RUjQpGhscHhM1Lx/9oADAMBAAIRAxEAPwD6O1LUA9xLqBXNaplsddPSmo55t1OVFlZu4nlfKXlnt6oRqWEEz5zzTrVNPLRW in C:\xampp\htdocs\dignitysmslatest\admin\Module\manage\pdf\fpdf.php on line 271
你爲什麼用'mysql'例子來回答使用'mysqli'的問題? – Naktibalda
已編輯只是一個錯字 –
這將是更好的解釋山姆做錯了什麼。 – Naktibalda