io
Packages
Interfaces
Classes
Files

Class: Upload

Source Location: /io/upload.class.php [line 40]

Class Overview


This class provides you methods to upload easily files to the ftp.

Author(s):

  • Régis VIARRE <crowkait@phpboost.com


Class Details

This class provides you methods to upload easily files to the ftp.

Tags:

  • author: Régis VIARRE <crowkait@phpboost.com
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor Upload [line 51]

Upload Upload( [string $base_directory = 'upload'])
constructor

Parameters:

string   $base_directory   Set the directory to upload the files.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method file [line 65]

boolean file( string $filepostname, [string $regexp = ''], [boolean $uniq_name = false], [int $weight_max = 100000000], [boolean $check_exist = true])
Uploads a file.

Tags:

  • return: True if the file has been succefully uploaded. Error code if an error occured.

Parameters:

string   $filepostname   Name in the input file formulary.
string   $regexp   Regular expression to specify file format.
boolean   $uniq_name   If true assign a new name if a file with same name already exist. Otherwise previous file is overwrite.
int   $weight_max   The maximum file size.
boolean   $check_exist   If true verify if a file with the same name exist on the ftp. Otherwise previous file is overwrite.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method validate_img [line 112]

string validate_img( string $filepath, int $width_max, int $height_max, [boolean $delete = true])
Checks whether an image is compliant to an maximum width and height, otherwise is $delete value is true delete it.

Tags:

  • return: Error code.

Parameters:

string   $filepath   Path to the image.
int   $width_max   Max width
int   $height_max   Max height
boolean   $delete  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 227]   mixed  $base_directory 
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 43]   mixed  $error  =  ''
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 228]   mixed  $extension  = array()
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 229]   mixed  $filename  = array()
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
Documentation generated on Tue, 28 Jul 2009 22:43:42 +0200 by phpDocumentor 1.4.1