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::resize()

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 difference between creating a copy and creating a thumbnail except a thumb will have the thumbnail marker as part of the name (i.e. mypic_thumb.jpg). All preferences listed in the Preferences table are available for this method except these three: rotation

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_Image_lib::rotate()

rotate() Returns: TRUE on success, FALSE on failure Return type: bool The image rotation method requires that the angle of rotation be set via its preference: $config['rotation_angle'] = '90'; There are 5 rotation options: 90 - rotates counter-clockwise by 90 degrees. 180 - rotates counter-clockwise by 180 degrees. 270 - rotates counter-clockwise by 270 degrees. hor - flips the image horizontally. vrt - flips the image vertically. Here’s an example showing how you might rotate 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_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::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::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

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::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