FileInclusion
in package
Verification of each file included on server, database, or form
Table of Contents
Methods
- includeFile() : bool|string
- Include a file on the server or database
- recreateImage() : bool|string
- Recreate an image uploaded, this lead to, in case of a file uploaded is a script disguised, to avoid code injection
- renameFile() : bool|string
- Renamme a file et move it on a temp folder
- reSizeImage() : bool
- Resize the picture to be in sens with standard of type(MIME)
- verifySignatureImage() : bool|int
- Return the type "MIME" of the picture
Methods
includeFile()
Include a file on the server or database
public
static includeFile([string $FileDirection = null ][, string $SQLRequest = null ]) : bool|string
Parameters
- $FileDirection : string = null
-
the file path
- $SQLRequest : string = null
-
SQL request to include the file
Return values
bool|stringrecreateImage()
Recreate an image uploaded, this lead to, in case of a file uploaded is a script disguised, to avoid code injection
public
static recreateImage(string $FileName, string $tmpFilePath) : bool|string
Parameters
- $FileName : string
-
Name of the file
- $tmpFilePath : string
-
Path of the file
Return values
bool|stringrenameFile()
Renamme a file et move it on a temp folder
public
static renameFile(string $tmpFilePath, string $originalFileName) : bool|string
Parameters
- $tmpFilePath : string
-
the path of the file
- $originalFileName : string
-
file name when uploaded by user
Return values
bool|stringreSizeImage()
Resize the picture to be in sens with standard of type(MIME)
public
static reSizeImage(string $File) : bool
Parameters
- $File : string
-
the path of the file
Return values
boolverifySignatureImage()
Return the type "MIME" of the picture
public
static verifySignatureImage(mixed $File) : bool|int
Parameters
- $File : mixed
-
path of the file to verify