PHP Doku:: Gibt den Wert eines Feldes zurück - function.fdf-get-value.html

Verlauf / Chronik / History: (14) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzNon-Text MIME-AusgabenForms Data Format FunktionenFDF Funktionenfdf_get_value

Ein Service von Reinhard Neidl - Webprogrammierung.

FDF Funktionen

<<fdf_get_status

fdf_get_version>>

fdf_get_value

(PHP 4, PHP 5)

fdf_get_valueGibt den Wert eines Feldes zurück

Beschreibung

string fdf_get_value ( resource $fdf_document , string $fieldname [, int $which ] )

Die Funktion fdf_get_value() gibt den Wert für den Parameter fieldname zurück.

Elemente eines Arrays können abgefragt werden, indem der optionale Parameter which übergeben wird. Die Elemente des abzufragenden Arrays starten bei Null. Bei Nicht-Array-Feldern wird der Parameter which ignoriert.

Hinweis:

Der optionale Parameter which und die Möglichkeit Arrays abzufragen wurden ab PHP-Version 4.3 hinzugefügt.

Siehe auch fdf_set_value().


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
mclinden at informed dot net
17.09.2002 23:35
(i filed a bug report/feature request for this on bugs.php.net and assigned it to myself hartmut@php.net)

The default behavior for the FDF Toolkit is to return an FDFErcNoValue for the FDFGetValue when the field exists but has no value.

Whether or not this is truly an error is debateable. It seems to become an issue in documents created by Acrobat 5 when optional fields are included in a form with required fields since the default behavior seems to be to populate the HTTP_FDF_DATA with the results of the FDFNextFieldName enumerator, which would include the fields which have no value.

This would not be a problem except that the PHP function fdf_get_value() does not specifically test for the FDFErcNoValue condition but, instead, tests for the more general FDFErcOK. If this value is not the result of the error code, the system issues warnings (the display of which could be turned off), but the broader question is, should this be a warning condition at all?

Put another way, should a return of FDFErcNoValue for FDFGetValue be considered an event worth generating a warning?



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)