|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-09-12 01:07 UTC] rob at rsee dot net
The following code causes a script to silently die on the call to pdf_place_image when the file in pdf_open_image_file is not accessible (exists but file permissions deny access). $image=pdf_open_image_file($pdf,"png","/usr/local/apache/htdocs/images/timesheet.png"); pdf_place_image($pdf, $image, 1, 1,.48); PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 20:00:01 2025 UTC |
you should use something like: if (!$image) { die("Couldn't open image ".$imagefile); } to check whether the image was existing, otherwise PDFlib will throw an exception when you use the invalid image handle afterwards.