Easy to use upload functions for (multiple) file upload with validation.
The name of the original (uploaded) file
The temporay name of the uploaded file
This var holds the new name after upload (note this name can different form the uploaded fileif you rename/copy the file)
Use always this variable if you store somewhere the filename!
The directory where the file will be uploaded
Set this var to true if an existing file should be replaced (default = false)
This var is used as a switch, possible setting y/n. In position 'y' the name is validated while using regular expressions.
Set this value to take care of the maximum length of a filename (default = 100)
This array holds all file extensions, you can add so much as you want.
This var is used for output (to show which extensions are allowed)
You need this var if your messages should be in an other language then English
This variable is required, this var holds the error reported in by $_FILES array.
Set this boolean if you want to (auto)rename a file (i use a timestamp is name)
This array is a container for all messages generated during the upload process.
Switch this boolean to create the upload directory if it doesn't exist (one level above)
The constructor, sets the language, the rename boolean and empties the file extension string.
This method is a multilanguage error selector, the property holds the error number
This method is used to show all strings inside the message array
checks if a custom filename exists, sets a default (new) filename or keeps the original one
This method is used to handle the upload process, $to_name is an additional custom name parameter (works together with the rename boolean)
Checks the "spelling" of a filename the length and that the name is not empty.
Isolate the files extension with this method
This method checks for a valid file extension
Use this method to build the extension string
This method is a group of functions which move the temporary file to his upload direction.
Check if the upload directory exists or not
This method checks if a file exists
updated in januar 2006