array_replace()

array_replace(array $array1[, ...]) Parameters: $array1 (array) – Array in which to replace elements ... (array) – Array (or multiple ones) from which to extract elements Returns: Modified array Return type: array For more information, please refer to the PHP manual for array_replace().

log_message()

log_message($level, $message) Parameters: $level (string) – Log level: ‘error’, ‘debug’ or ‘info’ $message (string) – Message to log Return type: void This function lets you write messages to your log files. You must supply one of three “levels” in the first parameter, indicating what type of message it is (debug, error, info), with the message itself in the second parameter. Example: if ($some_var == '') { log_message('error', 'Some variable did not contain a value.'); } els

is_really_writable()

is_really_writable($file) Parameters: $file (string) – File path Returns: TRUE if the path is writable, FALSE if not Return type: bool is_writable() returns TRUE on Windows servers when you really can’t write to the file as the OS reports to PHP as FALSE only if the read-only attribute is marked. This function determines if a file is actually writable by attempting to write to it first. Generally only recommended on platforms where this information may be unreliable. Example: if (is

CI_Input::valid_ip()

valid_ip($ip[, $which = '']) Parameters: $ip (string) – IP address $which (string) – IP protocol (‘ipv4’ or ‘ipv6’) Returns: TRUE if the address is valid, FALSE if not Return type: bool Takes an IP address as input and returns TRUE or FALSE (boolean) depending on whether it is valid or not. Note The $this->input->ip_address() method above automatically validates the IP address. if ( ! $this->input->valid_ip($ip)) { echo 'Not Valid'; } else { echo 'Vali

form_open_multipart()

form_open_multipart([$action = ''[, $attributes = array()[, $hidden = array()]]]) Parameters: $action (string) – Form action/target URI string $attributes (array) – HTML attributes $hidden (array) – An array of hidden fields’ definitions Returns: An HTML multipart form opening tag Return type: string This function is absolutely identical to form_open() above, except that it adds a multipart attribute, which is necessary if you would like to use the form to upload files with.

CI_User_agent::accept_lang()

accept_lang([$lang = 'en']) Parameters: $lang (string) – Language key Returns: TRUE if provided language is accepted, FALSE if not Return type: bool Lets you determine if the user agent accepts a particular language. Example: if ($this->agent->accept_lang('en')) { echo 'You accept English!'; } Note This method is not typically very reliable since some browsers do not provide language info, and even among those that do, it is not always accurate.

CI_Loader::remove_package_path()

remove_package_path([$path = '']) Parameters: $path (string) – Path to remove Returns: CI_Loader instance (method chaining) Return type: CI_Loader When your controller is finished using resources from an application package, and particularly if you have other application packages you want to work with, you may wish to remove the package path so the Loader no longer looks in that directory for resources. To remove the last path added, simply call the method with no parameters. Or to

CI_Loader::vars()

vars($vars[, $val = '']) Parameters: $vars (mixed) – An array of variables or a single variable name $val (mixed) – Optional variable value Returns: CI_Loader instance (method chaining) Return type: CI_Loader This method takes an associative array as input and generates variables using the PHP extract() function. This method produces the same result as using the second parameter of the $this->load->view() method above. The reason you might want to use this method independentl

CI_Loader::dbforge()

dbforge([$db = NULL[, $return = FALSE]]) Parameters: $db (object) – Database object $return (bool) – Whether to return the Database Forge instance Returns: Loaded CI_DB_forge instance if $return is set to TRUE, otherwise CI_Loader instance (method chaining) Return type: mixed Loads the Database Forge class, please refer to that manual for more info.

CI_Output::append_output()

append_output($output) Parameters: $output (string) – Additional output data to append Returns: CI_Output instance (method chaining) Return type: CI_Output Appends data onto the output string. $this->output->append_output($data);