Location: PHPKode > projects > FOOWD > foowd/apidocs/Foowd/Input/input_file.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>

<title>Input_file</title>

<link rel="stylesheet" type="text/css" href="../../stylesheet.css" />
<link rel="start" href="overview-summary.html" />

</head>

<body>

<table width="100%" cellpadding="0" class="header">
<tr><td class="header">
<a href="../../overview-summary.html">Overview</a>
<a href="package-summary.html">Package</a>
<a href="package-tree.html">Tree</a></td><td class="short_title">
FOOWD</td></tr>
</table>

<table width="100%" cellpadding="0" class="small_links">
<tr>
<td><a href="../../index.html" target="_top">FRAMES</a> <a href="input_file.html" target="_top">NO FRAMES</a></td>
</tr>
<tr>
<td>SUMMARY: <a href="#summary_field">FIELD</a> <a href="#summary_method">METHOD</a></td>
<td>DETAIL: <a href="#detail_field">FIELD</a> <a href="#detail_method">METHOD</a></td>
</tr>
</table>

<hr />

<h1>Class input_file</h1>

<pre><strong>input_file</strong><br /></pre>


<hr />

<p>
class <strong>input_file</strong><br />
</p>

<p>File upload class. </p><p>This class defines an file upload object, it handles upload validation, saving the uploaded file to a permanent location, and reporting upload errors. </p><dl><dt>Author:</dt><dd>Paul James </dd></dl>
<hr />
<br />

<a name="summary_field"></a>
<table width="100%" cellspacing="0" class="title">
<tr><th colspan="2" class="title">Field Summary</th></tr>
</table>

<table width="100%" cellspacing="0" class="body"><tr><td class="type">public str</td><td class="description"><a href="#$name">$name</a><br />The name of the file upload object. </td></tr><tr><td class="type">public array</td><td class="description"><a href="#$file">$file</a><br />Details of the uploaded file. </td></tr><tr><td class="type">public str</td><td class="description"><a href="#$caption">$caption</a><br />Caption to place next to file upload box. </td></tr><tr><td class="type">public int</td><td class="description"><a href="#$size">$size</a><br />Width of the file upload box. </td></tr><tr><td class="type">public int</td><td class="description"><a href="#$maxsize">$maxsize</a><br />Maximum size allowed of uploaded file. </td></tr></table>
<br />
<a name="summary_method"></a>
<table width="100%" cellspacing="0" class="title">
<tr><th colspan="2" class="title">Method Summary</th></tr>
</table>

<table width="100%" cellspacing="0" class="body"><tr><td class="type">public void</td><td class="description"><a href="#input_file">input_file</a><br />Constructs a new file upload object. </td></tr><tr><td class="type">public bool</td><td class="description"><a href="#isUploaded">isUploaded</a><br />Whether a file has been uploaded using this object. </td></tr><tr><td class="type">public bool</td><td class="description"><a href="#saveFile">saveFile</a><br />Save the uploaded file to a permanent location. </td></tr><tr><td class="type">public str</td><td class="description"><a href="#getError">getError</a><br />Return an error string for the occured file upload error. </td></tr><tr><td class="type">public void</td><td class="description"><a href="#display">display</a><br />Display the file upload box. </td></tr></table>
<br />
<hr />
<br />


<a name="detail_field"></a>
<table width="100%" cellspacing="0" class="title">
<tr><th class="title">Field Detail</th></tr>
</table>

<a name="$name"></a><h2>name</h2> <code>public str <strong>$name</strong></code><br /><p>The name of the file upload object. </p><p></p><hr /><a name="$file"></a><h2>file</h2> <code>public array <strong>$file</strong></code><br /><p>Details of the uploaded file. </p><p></p><hr /><a name="$caption"></a><h2>caption</h2> <code>public str <strong>$caption</strong></code><br /><p>Caption to place next to file upload box. </p><p></p><hr /><a name="$size"></a><h2>size</h2> <code>public int <strong>$size</strong></code><br /><p>Width of the file upload box. </p><p></p><hr /><a name="$maxsize"></a><h2>maxsize</h2> <code>public int <strong>$maxsize</strong></code><br /><p>Maximum size allowed of uploaded file. </p><p></p><hr />
<a name="detail_method"></a>
<table width="100%" cellspacing="0" class="title">
<tr><th class="title">Method Detail</th></tr>
</table>

<a name="input_file"></a><h2>input_file()</h2> <code>public void <strong>input_file</strong>(str name, str caption, int size, int maxsize)</code><br /><p>Constructs a new file upload object. </p><p></p><dl><dt>Parameters:</dt><dd><code>name</code> - The name of the file upload. </dd><dd><code>caption</code> - Caption to place next to file upload box. </dd><dd><code>size</code> - Width of the file upload box. </dd><dd><code>maxsize</code> - Maximum size allowed of uploaded file. </dd></dl><hr /><a name="isUploaded"></a><h2>isUploaded()</h2> <code>public bool <strong>isUploaded</strong>()</code><br /><p>Whether a file has been uploaded using this object. </p><p></p><dl><dt>Returns:</dt><dd>TRUE on success. </dd></dl><hr /><a name="saveFile"></a><h2>saveFile()</h2> <code>public bool <strong>saveFile</strong>(str dir, str filename)</code><br /><p>Save the uploaded file to a permanent location. </p><p></p><dl><dt>Parameters:</dt><dd><code>dir</code> - The local directory to save the file to. </dd><dd><code>filename</code> - The local filename to save the file as. </dd></dl><dl><dt>Returns:</dt><dd>TRUE on success. </dd></dl><hr /><a name="getError"></a><h2>getError()</h2> <code>public str <strong>getError</strong>()</code><br /><p>Return an error string for the occured file upload error. </p><p></p><dl><dt>Returns:</dt><dd>File upload error. </dd></dl><hr /><a name="display"></a><h2>display()</h2> <code>public void <strong>display</strong>()</code><br /><p>Display the file upload box. </p><p></p><hr />
<table width="100%" cellpadding="0" class="header">
<tr><td class="header">
<a href="../../overview-summary.html">Overview</a>
<a href="package-summary.html">Package</a>
<a href="package-tree.html">Tree</a></td><td class="short_title">
FOOWD</td></tr>
</table>

<table width="100%" cellpadding="0" class="small_links">
<tr>
<td><a href="../../index.html" target="_top">FRAMES</a> <a href="input_file.html" target="_top">NO FRAMES</a></td>
</tr>
<tr>
<td>SUMMARY: <a href="#summary_field">FIELD</a> <a href="#summary_method">METHOD</a></td>
<td>DETAIL: <a href="#detail_field">FIELD</a> <a href="#detail_method">METHOD</a></td>
</tr>
</table>

<hr />

<p class="footer">This document was generated by <a href="http://phpdoctor.sourceforge.net/">PHPDoctor: The PHP Documentation Creator</a>.</p>
</body>
</html>
Return current item: FOOWD