mirror of
https://github.com/php/doc-es.git
synced 2026-03-24 07:22:16 +01:00
69 lines
2.2 KiB
XML
69 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: PhilDaiguille Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<chapter xml:id="fdf.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
&reftitle.examples;
|
|
<para>
|
|
Los siguientes ejemplos muestran cómo evaluar los datos
|
|
del formulario.
|
|
<example>
|
|
<title>Evaluar un documento FDF</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Abrir un fichero FDF desde una string proporcionada por la extensión PDF
|
|
// El formulario PDF contiene varios campos de texto con los nombres
|
|
// volume, date, comment, publisher, preparer y dos casillas de verificación
|
|
// show_publisher y show_preparer.
|
|
$fdf = fdf_open_string($HTTP_FDF_DATA);
|
|
$volume = fdf_get_value($fdf, "volume");
|
|
echo 'El campo Volume contiene el valor: "<strong>' . $volume . '</strong>"<br />';
|
|
|
|
$date = fdf_get_value($fdf, "date");
|
|
echo 'El valor del campo date era "<strong>' . $date . '</strong>"<br />';
|
|
|
|
$comment = fdf_get_value($fdf, "comment");
|
|
echo 'El valor del campo comment era "<strong>' . $comment . '</strong>"<br />';
|
|
|
|
if (fdf_get_value($fdf, "show_publisher") == "On") {
|
|
$publisher = fdf_get_value($fdf, "publisher");
|
|
echo "El valor del campo Publisher era: '<strong>" . $publisher . "</strong><br />";
|
|
} else
|
|
echo 'El valor del campo Publisher no debe ser mostrado.<br />';
|
|
|
|
if (fdf_get_value($fdf, "show_preparer") == "On") {
|
|
$preparer = fdf_get_value($fdf, "preparer");
|
|
echo 'El valor del campo Preparer era "<strong>' . $preparer . '</strong>"<br />';
|
|
} else
|
|
echo 'El valor del campo Preparer no debe ser mostrado.<br />';
|
|
fdf_close($fdf);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</chapter>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|