Class Upload
Classe d'envoi de multiples fichiers. En option utilisation de finfo ou mimemagic
$up = new File_Upload('dossier/uplaod/fichier','nomchamps',modeType); $up->setMaxFileSize('5M')->setWriteMode(2); $error = $up->upload(); if(!empty($error)) $up->getSummary(); else foreach(errors as $key=>$err) echo $err;
Namespace: Pry\File
Package: File
Category: Pry
Author: Olivier ROGER <oroger.fr>
Version: 2.1.0
Located at File/Upload.class.php
Package: File
Category: Pry
Author: Olivier ROGER <oroger.fr>
Version: 2.1.0
Located at File/Upload.class.php
public
|
|
public
array
|
|
public
File_Upload
|
#
setMaxFileSize( mixed $size )
Défini la taille maximal du fichier. Accepte un int ou une notation du type 500K, 2M |
public
File_Upload
|
|
public
File_Upload
|
|
public
File_Upload
|
|
public
File_Upload
|
#
setAllowedExtensions( mixed $newExt )
Défini une (string) ou plusieurs (array) extensions autorisées |
public
array
|
|
public
File_Upload
|
|
public
File_Upload
|
|
public
File_Upload
|
|
public
array
|
|
public
File_Upload
|
|
public
File_Upload
|
|
public
File_Upload
|
|
public
File_Upload
|
|
public
File_Upload
|
|
public
File_Upload
|
#
setSecureMode( boolean $mode )
Défini ou non le mode sécurisé qui n'accepte aucun fichier de type application ou jugé dangereux |
public
File_Upload
|
|
public
array
|
|
public
array
|
integer |
MIME_CHECK_BROWSER
|
1 |
|
integer |
MIME_CHECK_FINFO
|
2 |
|
integer |
MIME_CHECK_MIMETYPE
|
3 |
|
integer |
MIME_CHECK_NONE
|
4 |
|
integer |
REQUIRE_ALL
|
1 |
|
integer |
REQUIRE_YES
|
2 |
|
integer |
REQUIRE_NO
|
3 |
|
integer |
WMODE_OVERWRITE
|
1 |
|
integer |
WMODE_COPY
|
2 |
|
integer |
WMODE_CANCEL
|
3 |