[PHP] writing a pdf file to the filesystem
Hi there, I am trying to write a pdf file which is created by a php script to the filesystem. Here is the end of the php file which creates the pdf document: . . . $pdf_close($pdf); $data = pdf_get_buffer($pdf); Can anybody tell me how to save the file instead of printing it out directly? Thank you for any hint, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] writing a pdf file to the filesystem
On Tue, 31 Aug 2004 12:58:49 +0200, Merlin [EMAIL PROTECTED] wrote: I am trying to write a pdf file which is created by a php script to the filesystem. Here is the end of the php file which creates the pdf document: $pdf_close($pdf); $data = pdf_get_buffer($pdf); $fp = fopen('file.pdf', 'w'); if ($fp) { fwrite($fp, $data); fclose($fp); } else print 'Failed to open file for writing'; -- Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php