Back to Littlefoot Manual

These are helper functions that just make things easier.

string thumbnail($html, $dimensions = '200x200')

Given a block of $html text, this function will search for any image src attribute and replace the image src URL with a reference to a local thumbnail of size $dimensions and return the processed output.

array() upload($destfolder);

This will process anything found in the $_FILES superglobal. It will loop through and upload all valid files into $destfolder. It makes file upload a sinch.

void rrmdir($dir);

Recursively delete $dir folder and contents

void redirect302($url = '');

If no URL is given, the page will be 302 redirected back to the REFERRER. If a URL is provided, the page will be redirected there instead. This is ideally used at the end of an app method like a post to return to the main view.

void Unzip($dir, $file)

Unzip a file at $dir/$file

void downloadFile($url, $path)

Downloads a file from $url, saves to $path

Next we cover how to interact with the Database

blog comments powered by Disqus