CI_Image_lib::initialize()

initialize([$props = array()]) Parameters: $props (array) – Image processing preferences Returns: TRUE on success, FALSE in case of invalid settings Return type: bool Initializes the class for processing an image.

CI_Image_lib::display_errors()

display_errors([$open = ' [, $close = ' ']]) Parameters: $open (string) – Error message opening tag $close (string) – Error message closing tag Returns: Error messages Return type: string Returns all detected errors formatted as a string. echo $this->image_lib->display_errors();

CI_Image_lib::crop()

crop() Returns: TRUE on success, FALSE on failure Return type: bool The cropping method works nearly identically to the resizing function except it requires that you set preferences for the X and Y axis (in pixels) specifying where to crop, like this: $config['x_axis'] = 100; $config['y_axis'] = 40; All preferences listed in the Preferences table are available for this method except these: rotation_angle, create_thumb and new_image. Here’s an example showing how you might crop an image: $

CI_Image_lib::clear()

clear() Return type: void The clear method resets all of the values used when processing an image. You will want to call this if you are processing images in a loop. $this->image_lib->clear();

CI_Image_lib

class CI_Image_lib initialize([$props = array()]) Parameters: $props (array) – Image processing preferences Returns: TRUE on success, FALSE in case of invalid settings Return type: bool Initializes the class for processing an image. resize() Returns: TRUE on success, FALSE on failure Return type: bool The image resizing method lets you resize the original image, create a copy (with or without resizing), or create a thumbnail image. For practical purposes there is no differenc

CI_FTP::upload()

upload($locpath, $rempath[, $mode = 'auto'[, $permissions = NULL]]) Parameters: $locpath (string) – Local file path $rempath (string) – Remote file path $mode (string) – FTP mode, defaults to ‘auto’ (options are: ‘auto’, ‘binary’, ‘ascii’) $permissions (int) – File permissions (octal) Returns: TRUE on success, FALSE on failure Return type: bool Uploads a file to your server. You must supply the local path and the remote path, and you can optionally set the mode and permissions. E

CI_FTP::rename()

rename($old_file, $new_file[, $move = FALSE]) Parameters: $old_file (string) – Old file name $new_file (string) – New file name $move (bool) – Whether a move is being performed Returns: TRUE on success, FALSE on failure Return type: bool Permits you to rename a file. Supply the source file name/path and the new file name/path. // Renames green.html to blue.html $this->ftp->rename('/public_html/foo/green.html', '/public_html/foo/blue.html');

CI_FTP::move()

move($old_file, $new_file) Parameters: $old_file (string) – Old file name $new_file (string) – New file name Returns: TRUE on success, FALSE on failure Return type: bool Lets you move a file. Supply the source and destination paths: // Moves blog.html from "joe" to "fred" $this->ftp->move('/public_html/joe/blog.html', '/public_html/fred/blog.html'); Note If the destination file name is different the file will be renamed.

CI_FTP::mkdir()

mkdir($path[, $permissions = NULL]) Parameters: $path (string) – Path to directory to create $permissions (int) – Permissions (octal) Returns: TRUE on success, FALSE on failure Return type: bool Lets you create a directory on your server. Supply the path ending in the folder name you wish to create, with a trailing slash. Permissions can be set by passing an octal value in the second parameter. // Creates a folder named "bar" $this->ftp->mkdir('/public_html/foo/bar/', 0755);

CI_FTP::mirror()

mirror($locpath, $rempath) Parameters: $locpath (string) – Local path $rempath (string) – Remote path Returns: TRUE on success, FALSE on failure Return type: bool Recursively reads a local folder and everything it contains (including sub-folders) and creates a mirror via FTP based on it. Whatever the directory structure of the original file path will be recreated on the server. You must supply a source path and a destination path: $this->ftp->mirror('/path/to/myfolder/', '/pu