Fileupload class.
This is a class for handling file uploads. It assumes that one or more files have been uploaded and are being actioned by the current Php script which instantiates this object.
Located in /file-defs.php (line 674)
Array of allowed mimetypes (unset = any types)
Destination dir to put files
Error code. Check to see if error occurred.
Error message array, goes with errcode.
Upload field name
Original filename
Upload path to the file on the server
Physical size of the file (bytes)
True if some files were uploaded
Max filesize, else delete (0 = any size)
Mime type of the the file
Array of info on uploaded files
No. of files uploaded
Constructor. On instantiation this class checks the global variable space for uploaded file info and pre-processes it.
NB: You may specify a filesize limit with $maxsize. If you do then we do not take notice of the MAX_FILE_SIZE submitted from the form. This is recommended, since the form value can easily be hacked..
Acquire the details on the current upload file. This includes the
original filename, its mimetype, its size and the full path on the webserver to which the file was uploaded. The details are populated in class variables: $this->fieldname $this->filename $this->mimetype $this->filesize $this->filepath And these variables are then available to be read/used by the calling application code.
Get details on the last file which was uploaded. If there are no more, then this function returns false.
Get details on the next file which was uploaded. If there are no more, then this function returns false.
Get details on the previous file which was uploaded. If there are no more, then this function returns false.
Set the allowed list of filetypes. This is specified as a comma-delimited list, and replaces any already defined.
Set the maximum filesize allowed
Store the current upload file. Optionally specify a destination dir, and a filename. This is useful if you want to process each file separately, and need to store the uploaded file in a particular place.
Store all files away at destination dir. We use the original names by default.
Documentation generated by phpDocumentor 1.3.0RC3