PHP 8.3.4 Released!

fdf_save

(PHP 4, PHP 5 < 5.3.0, PECL fdf SVN)

fdf_saveFDF ドキュメントを保存する

説明

fdf_save(resource $fdf_document, string $filename = ?): bool

FDF ドキュメントを保存します。

パラメータ

fdf_document

fdf_create()fdf_open() あるいは fdf_open_string() が返す FDF ドキュメントハンドル。

filename

指定した場合は、結果の FDF がここに書き込まれます。 それ以外の場合は、この関数は FDF をデフォルトの PHP 出力ストリームに書き込みます。

戻り値

成功した場合に true を、失敗した場合に false を返します。

参考

add a note

User Contributed Notes 1 note

up
-3
karsten at k-fish dot de
20 years ago
The doc says that an empty file name will cause PHP to output the FDF to 'stdout'. I had no success on this (with PHP 4.2.3 and fdftk v5): no string, an empty string and null all returned a message complaining about 'wrong parameter count'.

So I used the way (saving to a file and using passthru) given as an example on the page describing fdf_create(), and added a uniqid(rand(),1) to the filename to avoid clashes. This worked well.
To Top