HTTP_Upload
[ class tree: HTTP_Upload ] [ index: HTTP_Upload ] [ all elements ]

Class: HTTP_Upload

Source Location: /HTTP_Upload-1.0.0b2/HTTP/Upload.php

Class Overview

PEAR
   |
   --HTTP_Upload_Error
      |
      --HTTP_Upload

This class provides an advanced file uploader system for file uploads made from html forms


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTTP_Upload_Error

HTTP_Upload_Error::HTTP_Upload_Error()
Constructor
HTTP_Upload_Error::errorCode()
returns the error code
HTTP_Upload_Error::raiseError()
Overwrites the PEAR::raiseError method

Class Details

[line 193]
This class provides an advanced file uploader system for file uploads made from html forms


[ Top ]


Class Variables

$files = array()

[line 199]

Contains an array of "uploaded files" objects

Type:   array


[ Top ]



Method Detail

HTTP_Upload (Constructor)   [line 235]

HTTP_Upload HTTP_Upload( [string $lang = null])

Constructor
  • See: Upload_Error::error_codes
  • Access: public

Parameters:

string   $lang     Language to use for reporting errors

[ Top ]

getFiles   [line 268]

mixed &getFiles( [mixed $file = null])

Get files
  • Return: array or object (see @param $file above) or Pear_Error
  • Access: public

Parameters:

mixed   $file     If:
  • not given, function will return array of upload_file objects
  • is int, will return the $file position in upload_file objects array
  • is string, will return the upload_file object corresponding to $file name of the form. For ex: if form is <input type="file" name="userfile"> to get this file use: $upload->getFiles('userfile')

[ Top ]

isMissing   [line 399]

mixed isMissing( )

Checks if the user submited or not some file
  • Return: False when are files or PEAR_Error when no files
  • See: Read the note in the source code about this function
  • Access: public

[ Top ]

setChmod   [line 432]

void setChmod( int $mode)

Sets the chmod to be used for uploaded files

Parameters:

int   $mode     Desired mode

[ Top ]


Documentation generated on Tue, 05 Oct 2010 16:30:02 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.