TwistPHP Documentation

file

File path: dist/twist/Core/Utilities/Route.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

fileServe a file form a particular route, you can change the name of the file upon download and restrict the download bandwidth (very helpful if you have limited bandwidth)

Parameters

Name Type Description
$strURIstringn/a
$dirFilePathstringn/a
[$strServeName = null]stringn/a
[$intLimitDownloadSpeed = null]integern/a

Return Values

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

Example

<?php
//Set the variables for the example
$strURI 'foo';
$dirFilePath '/home/user/public_html/twist';
$strServeName null;
$intLimitDownloadSpeed null;

//Call the function file with the example vars
Twist::Route() -> file($strURI$dirFilePath$strServeName$intLimitDownloadSpeed);