CI_Lang::load()

load($langfile[, $idiom = ''[, $return = FALSE[, $add_suffix = TRUE[, $alt_path = '']]]]) Parameters: $langfile (mixed) – Language file to load or array with multiple files $idiom (string) – Language name (i.e. ‘english’) $return (bool) – Whether to return the loaded array of translations $add_suffix (bool) – Whether to add the ‘_lang’ suffix to the language file name $alt_path (string) – An alternative path to look in for the language file Returns: Array of language lines if $return

Server Requirements

PHP version 5.6 or newer is recommended. It should work on 5.3.7 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features. A database is required for most web application programming. Currently supported databases are: MySQL (5.1+) via the mysql (deprecated), mysqli and pdo drivers Oracle via the oci8 and pdo drivers PostgreSQL via the postgre and pdo drivers MS SQL via the mssql, sqlsrv (version 2

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.

word_censor()

word_censor($str, $censored[, $replacement = '']) Parameters: $str (string) – Input string $censored (array) – List of bad words to censor $replacement (string) – What to replace bad words with Returns: Censored string Return type: string Enables you to censor words within a text string. The first parameter will contain the original string. The second will contain an array of words which you disallow. The third (optional) parameter can contain a replacement value for the words. If

alternator()

alternator($args) Parameters: $args (mixed) – A variable number of arguments Returns: Alternated string(s) Return type: mixed Allows two or more items to be alternated between, when cycling through a loop. Example: for ($i = 0; $i < 10; $i++) { echo alternator('string one', 'string two'); } You can add as many parameters as you want, and with each iteration of your loop the next item will be returned. for ($i = 0; $i < 10; $i++) { echo alternator('one', 'two',

form_error()

form_error([$field = ''[, $prefix = ''[, $suffix = '']]]) Parameters: $field (string) – Field name $prefix (string) – Error opening tag $suffix (string) – Error closing tag Returns: HTML-formatted form validation error message(s) Return type: string Returns a validation error message from the Form Validation Library, associated with the specified field name. You can optionally specify opening and closing tag(s) to put around the error message. Example: // Assuming that the 'userna

doctype()

doctype([$type = 'xhtml1-strict']) Parameters: $type (string) – Doctype name Returns: HTML DocType tag Return type: string Helps you generate document type declarations, or DTD’s. XHTML 1.0 Strict is used by default, but many doctypes are available. Example: echo doctype(); // <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> echo doctype('html4-trans'); // <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http:/

CI_Output::set_header()

set_header($header[, $replace = TRUE]) Parameters: $header (string) – HTTP response header $replace (bool) – Whether to replace the old header value, if it is already set Returns: CI_Output instance (method chaining) Return type: CI_Output Permits you to manually set server headers, which the output class will send for you when outputting the final rendered display. Example: $this->output->set_header('HTTP/1.0 200 OK'); $this->output->set_header('HTTP/1.1 200 OK'); $thi

random_element()

random_element($array) Parameters: $array (array) – Input array Returns: A random element from the array Return type: mixed Takes an array as input and returns a random element from it. Usage example: $quotes = array( "I find that the harder I work, the more luck I seem to have. - Thomas Jefferson", "Don't stay in bed, unless you can make money in bed. - George Burns", "We didn't lose the game; we just ran out of time. - Vince Lombardi", "If everythin

CI_DB_query_builder::or_not_like()

or_not_like($field[, $match = ''[, $side = 'both'[, $escape = NULL]]]) Parameters: $field (string) – Field name $match (string) – Text portion to match $side (string) – Which side of the expression to put the ‘%’ wildcard on $escape (bool) – Whether to escape values and identifiers Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds a NOT LIKE clause to a query, separating multiple calls with OR.