PDF_close problem

From: Date: Wed, 06 Jan 1999 09:28:22 +0000
Subject: PDF_close problem
Groups: php.dev 
Request: Send a blank email to php-dev+get-3326@lists.php.net to get a copy of this message
Hi, I have followed the recent discussion about the PDF_close bug. The current solution to skip the extra fclose() after a PDF_close() doesn'n quite solve the problem from my point of view, but I may be very wrong. In the following functions starting with PDF are from pdflib, those starting with pdf are php3 functions. Problem: pdf_open() requires an already open file opened with fopen(). If pdf_close() is called it calls PDF_close() which closes this file but the php3 variable isn't removed. Only the pdf document is destroyed. I wonder what happens when it is removed by php3 automatically? Example: $fp = fopen(....); $info = pdf_get_info(...); $pdf = pdf_open($fp, $info); // At this point we have an open file in $fp and // a pdf document in $pdf .... pdf_close($pdf); // Now the file is closed, the pdf document is removed // but the variable $fp is still there pointing to a // closed file :-( I wonder if that is problem? Uwe -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3326) next »