CI_Loader::driver()

driver($library[, $params = NULL[, $object_name]]) Parameters: $library (mixed) – Library name as a string or an array with multiple libraries $params (array) – Optional array of parameters to pass to the loaded library’s constructor $object_name (string) – Optional object name to assign the library to Returns: CI_Loader instance (method chaining) Return type: CI_Loader This method is used to load driver libraries, acts very much like the library() method. As an example, if you wo

get_cookie()

get_cookie($index[, $xss_clean = NULL]) Parameters: $index (string) – Cookie name $xss_clean (bool) – Whether to apply XSS filtering to the returned value Returns: The cookie value or NULL if not found Return type: mixed This helper function gives you friendlier syntax to get browser cookies. Refer to the Input Library for detailed description of its use, as this function acts very similarly to CI_Input::cookie(), except it will also prepend the $config['cookie_prefix'] that you mi

gmt_to_local()

gmt_to_local([$time = ''[, $timezone = 'UTC'[, $dst = FALSE]]]) Parameters: $time (int) – UNIX timestamp $timezone (string) – Timezone $dst (bool) – Whether DST is active Returns: UNIX timestamp Return type: int Takes a UNIX timestamp (referenced to GMT) as input, and converts it to a localized timestamp based on the timezone and Daylight Saving Time submitted. Example: $timestamp = 1140153693; $timezone = 'UM8'; $daylight_saving = TRUE; echo gmt_to_local($timestamp, $timezone, $

CI_Form_validation::error_string()

error_string([$prefix = ''[, $suffix = '']]) Parameters: $prefix (string) – Error message prefix $suffix (string) – Error message suffix Returns: Error messages as a string Return type: string Returns all error messages (as returned from error_array()) formatted as a string and separated by a newline character.

CI_Form_validation

class CI_Form_validation set_rules($field[, $label = ''[, $rules = '']]) Parameters: $field (string) – Field name $label (string) – Field label $rules (mixed) – Validation rules, as a string list separated by a pipe “|”, or as an array or rules Returns: CI_Form_validation instance (method chaining) Return type: CI_Form_validation Permits you to set validation rules, as described in the tutorial sections above: Setting Validation Rules Saving Sets of Validation Rules to a Config F

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

download($rempath, $locpath[, $mode = 'auto']) Parameters: $rempath (string) – Remote file path $locpath (string) – Local file path $mode (string) – FTP mode, defaults to ‘auto’ (options are: ‘auto’, ‘binary’, ‘ascii’) Returns: TRUE on success, FALSE on failure Return type: bool Downloads a file from your server. You must supply the remote path and the local path, and you can optionally set the mode. Example: $this->ftp->download('/public_html/myfile.html', '/local/path/to/m

CI_DB_utility::list_databases()

list_databases() Returns: Array of database names found Return type: array Retrieve a list of all the database names.

show_404()

show_404($page = '', $log_error = TRUE) Parameters: $page (string) – URI string $log_error (bool) – Whether to log the error Return type: void This function will display the 404 error message supplied to it using the error template appropriate to your execution: application/views/errors/html/error_404.php or: application/views/errors/cli/error_404.php The function expects the string passed to it to be the file path to the page that isn’t found. The exit status code will be set to

password_hash()

password_hash($password, $algo[, $options = array()]) Parameters: $password (string) – Plain-text password $algo (int) – Hashing algorithm $options (array) – Hashing options Returns: Hashed password or FALSE on failure Return type: string For more information, please refer to the PHP manual for password_hash(). Note Unless you provide your own (and valid) salt, this function has a further dependency on an available CSPRNG source. Each of the following would satisfy that: - mcrypt