abhi
abhi

Reputation: 19

PDF generation using empty images using FPDF

I have a php student application file displaying database details,and i am exporting this page to pdf using fpdf. but if a student as uploaded the photo, pdf is generating but if student is not uploaded the photo, pdf is not generating. how can i generate a pdf.

Upvotes: 1

Views: 709

Answers (1)

JoelBonetR
JoelBonetR

Reputation: 1572

check file_exists from official php website:

http://php.net/manual/es/function.file-exists.php

conditionally print (if exists) or not (if not). If you try to print something that does not exists it will provoke errors.

Upvotes: 1

Related Questions