TwistPHP Documentation

file

File path: dist/twist/Core/Controllers/Upload.controller.php
Namespace: Twist\Core\Controllers
Extends: Base

fileUpload a file to the site and place in the uploads directory

Parameters

Name Type Description
[$strFileKey = null]stringn/a

Return Values

void — No return information has been documented for this function.

Example

<?php
/** --------- Option 1 --------- */

//Register a dynamic route that will direct all function requests to the controller
Twist::Route() -> controller('/upload%','\Twist\Core\Controllers\Upload');

/** --------- Option 2 --------- */

//Or you can register a route to only direct the current request to a particular controller method
Twist::Route() -> get('/upload/file',array('\Twist\Core\Controllers\Upload','file'));