mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 13:57:03 +08:00
95 lines
5.0 KiB
HTML
95 lines
5.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Open a FDF document</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.fdf-open" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">fdf_open</h1>
|
|
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">fdf_open</span> — <span class="dc-title">Open a FDF document</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.fdf-open-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>fdf_open</strong></span>
|
|
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
|
|
) : <span class="type">resource</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
Opens a file with form data.
|
|
</p>
|
|
<p class="para">
|
|
You can also use <span class="function"><a href="fdf_open_string.html" class="function">fdf_open_string()</a></span> to process the
|
|
results of a PDF form POST request.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.fdf-open-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">filename</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
Path to the FDF file. This file must contain the data as returned from
|
|
a PDF form or created using <span class="function"><a href="fdf_create.html" class="function">fdf_create()</a></span> and
|
|
<span class="function"><a href="fdf_save.html" class="function">fdf_save()</a></span>.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.fdf-open-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns a FDF document handle, or <strong><code>FALSE</code></strong> on error.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.fdf-open-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-4154">
|
|
<p><strong>Example #1 Accessing the form data</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">// Save the FDF data into a temp file<br /></span><span style="color: #0000BB">$fdffp </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">"test.fdf"</span><span style="color: #007700">, </span><span style="color: #DD0000">"w"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">$fdffp</span><span style="color: #007700">, </span><span style="color: #0000BB">$HTTP_FDF_DATA</span><span style="color: #007700">, </span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">$HTTP_FDF_DATA</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$fdffp</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Open temp file and evaluate data<br /></span><span style="color: #0000BB">$fdf </span><span style="color: #007700">= </span><span style="color: #0000BB">fdf_open</span><span style="color: #007700">(</span><span style="color: #DD0000">"test.fdf"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/* ... */<br /></span><span style="color: #0000BB">fdf_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$fdf</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.fdf-open-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="fdf_open_string.html" class="function" rel="rdfs-seeAlso">fdf_open_string()</a> - Read a FDF document from a string</span></li>
|
|
<li class="member"><span class="function"><a href="fdf_close.html" class="function" rel="rdfs-seeAlso">fdf_close()</a> - Close an FDF document</span></li>
|
|
<li class="member"><span class="function"><a href="fdf_create.html" class="function" rel="rdfs-seeAlso">fdf_create()</a> - Create a new FDF document</span></li>
|
|
<li class="member"><span class="function"><a href="fdf_save.html" class="function" rel="rdfs-seeAlso">fdf_save()</a> - Save a FDF document</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |