Class upload

Description

class for doing uploads

Located in /lib/upload.php (line 68)


	
			
Variable Summary
array $allow
mixed $createDir
string $dbTable
array $error
int $mode
string $saveFile
array $status
string $uploadDir
boolean $useDocRoot
Method Summary
upload __construct ([array $options = null], [ $createDir = false])
int moveFile ([name $filename = null], [ $options = null])
boolean unlinkFile ( $filename)
Variables
array $allow = array('tar.gz', 'zip') (line 82)
  • var: types to allow eg
    1. array('zip''tar.gz');
  • access: public
mixed $createDir (line 86)
  • access: public
string $dbTable = 'files' (line 76)
  • var: table for doing crud operations on
  • access: public
array $error = array() (line 70)
  • var: holding errors
  • access: public
int $mode = 0775 (line 80)
  • var: default mode when creating a dir
  • access: public
string $saveFile = null (line 84)
  • var: name of file saved
  • access: public
array $status = array() (line 72)
  • var: holding status messages to use elsewhere
  • access: public
string $uploadDir = '/files/content' (line 74)
  • var: uploadDir
  • access: public
boolean $useDocRoot = true (line 78)
  • var: use docroot DOCUMENT_ROOT or not
  • access: public
Methods
Constructor __construct (line 94)

constructor

init and try to set put dir. Try to make it if not exists. sets options

upload __construct ([array $options = null], [ $createDir = false])
  • array $options: array of options
  • $createDir
moveFile (line 116)

method for moving uploaded file

  • return: true on success or false on failure
  • access: public
int moveFile ([name $filename = null], [ $options = null])
  • name $filename: of file in the html forms file field
  • $options
unlinkFile (line 147)

method for unlinking a file

  • return: true on success or false on failure
  • access: public
boolean unlinkFile ( $filename)
  • $filename

Documentation generated on Fri, 17 Dec 2010 17:56:37 +0100 by phpDocumentor 1.4.3