function_usable()

function_usable($function_name) Parameters: $function_name (string) – Function name Returns: TRUE if the function can be used, FALSE if not Return type: bool Returns TRUE if a function exists and is usable, FALSE otherwise. This function runs a function_exists() check and if the Suhosin extension <http://www.hardened-php.net/suhosin/> is loaded, checks if it doesn’t disable the function being checked. It is useful if you want to check for the availability of functions such as

is_php()

is_php($version) Parameters: $version (string) – Version number Returns: TRUE if the running PHP version is at least the one specified or FALSE if not Return type: bool Determines if the PHP version being used is greater than the supplied version number. Example: if (is_php('5.3')) { $str = quoted_printable_encode($str); } Returns boolean TRUE if the installed version of PHP is equal to or greater than the supplied version number. Returns FALSE if the installed version of P

CI_Session::set_flashdata()

set_flashdata($data[, $value = NULL]) Parameters: $data (mixed) – An array of key/value pairs to set as flashdata, or the key for a single item $value (mixed) – The value to set for a specific session item, if $data is a key Return type: void Assigns data to the $_SESSION superglobal and marks it as “flashdata”. Note This is a legacy method kept only for backwards compatibility with older applications.

CI_DB_query_builder::delete()

delete([$table = ''[, $where = ''[, $limit = NULL[, $reset_data = TRUE]]]]) Parameters: $table (mixed) – The table(s) to delete from; string or array $where (string) – The WHERE clause $limit (int) – The LIMIT clause $reset_data (bool) – TRUE to reset the query “write” clause Returns: CI_DB_query_builder instance (method chaining) or FALSE on failure Return type: mixed Compiles and executes a DELETE query.

CI_DB_query_builder::limit()

limit($value[, $offset = 0]) Parameters: $value (int) – Number of rows to limit the results to $offset (int) – Number of rows to skip Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds LIMIT and OFFSET clauses to a query.

CI_Zip::add_data()

add_data($filepath[, $data = NULL]) Parameters: $filepath (mixed) – A single file path or an array of file => data pairs $data (array) – File contents (ignored if $filepath is an array) Return type: void Adds data to the Zip archive. Can work both in single and multiple files mode. When adding a single file, the first parameter must contain the name you would like given to the file and the second must contain the file contents: $name = 'mydata1.txt'; $data = 'A Data String!'; $thi

CI_Zip::download()

download($filename = 'backup.zip') Parameters: $filename (string) – Archive file name Return type: void Causes the Zip file to be downloaded from your server. You must pass the name you would like the zip file called. Example: $this->zip->download('latest_stuff.zip'); // File will be named "latest_stuff.zip" Note Do not display any data in the controller in which you call this method since it sends various server headers that cause the download to happen and the file to be tre

CI_DB_query_builder::select_max()

select_max([$select = ''[, $alias = '']]) Parameters: $select (string) – Field to compute the maximum of $alias (string) – Alias for the resulting value name Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds a SELECT MAX(field) clause to a query.

CI_Session::keep_flashdata()

keep_flashdata($key) Parameters: $key (mixed) – Flashdata key to keep, or an array of multiple keys Returns: TRUE on success, FALSE on failure Return type: bool Retains the specified session data key(s) as “flashdata” through the next request. Note This is a legacy method kept only for backwards compatibility with older applications. It is just an alias for the mark_as_flash() method.

CI_Zip::read_dir()

read_dir($path[, $preserve_filepath = TRUE[, $root_path = NULL]]) Parameters: $path (string) – Path to directory $preserve_filepath (bool) – Whether to maintain the original path $root_path (string) – Part of the path to exclude from the archive directory Returns: TRUE on success, FALSE on failure Return type: bool Permits you to compress a directory (and its contents) that already exists somewhere on your server. Supply a path to the directory and the zip class will recursively r