CI_User_agent::platform()

platform() Returns: Detected operating system or an empty string Return type: string Returns a string containing the platform viewing your site (Linux, Windows, OS X, etc.).

Using CodeIgniter Libraries

All of the available libraries are located in your system/libraries/ directory. In most cases, to use one of these classes involves initializing it within a controller using the following initialization method: $this->load->library('class_name'); Where ‘class_name’ is the name of the class you want to invoke. For example, to load the Form Validation Library you would do this: $this->load->library('form_validation'); Once initialized you can use it as indicated in the user guide pa

Installation Instructions

CodeIgniter is installed in four steps: Unzip the package. Upload the CodeIgniter folders and files to your server. Normally the index.php file will be at your root. Open the application/config/config.php file with a text editor and set your base URL. If you intend to use encryption or sessions, set your encryption key. If you intend to use a database, open the application/config/database.php file with a text editor and set your database settings. If you wish to increase security by hiding th

CI_Xmlrpc

class CI_Xmlrpc initialize([$config = array()]) Parameters: $config (array) – Configuration data Return type: void Initializes the XML-RPC library. Accepts an associative array containing your settings. server($url[, $port = 80[, $proxy = FALSE[, $proxy_port = 8080]]]) Parameters: $url (string) – XML-RPC server URL $port (int) – Server port $proxy (string) – Optional proxy $proxy_port (int) – Proxy listening port Return type: void Sets the URL and port number of the ser

CI_Xmlrpc::display_response()

display_response() Returns: Response Return type: mixed Returns the response from the remote server once request is received. The response will typically be an associative array. $this->xmlrpc->display_response();

redirect()

redirect($uri = '', $method = 'auto', $code = NULL) Parameters: $uri (string) – URI string $method (string) – Redirect method (‘auto’, ‘location’ or ‘refresh’) $code (string) – HTTP Response code (usually 302 or 303) Return type: void Does a “header redirect” to the URI specified. If you specify the full site URL that link will be built, but for local links simply providing the URI segments to the controller you want to direct to will create the link. The function will build the URL

CI_URI::rsegment()

rsegment($n[, $no_result = NULL]) Parameters: $n (int) – Segment index number $no_result (mixed) – What to return if the searched segment is not found Returns: Routed segment value or $no_result value if not found Return type: mixed This method is identical to segment(), except that it lets you retrieve a specific segment from your re-routed URI in the event you are using CodeIgniter’s URI Routing feature.

CI_URI::segment_array()

segment_array() Returns: URI segments array Return type: array Returns an array containing the URI segments. For example: $segs = $this->uri->segment_array(); foreach ($segs as $segment) { echo $segment; echo '<br />'; }

CI_URI::total_rsegments()

total_rsegments() Returns: Count of routed URI segments Return type: int This method is identical to total_segments(), except that it returns the total number of segments in your re-routed URI in the event you are using CodeIgniter’s URI Routing feature.

CI_URI::slash_segment()

slash_segment($n[, $where = 'trailing']) Parameters: $n (int) – Segment index number $where (string) – Where to add the slash (‘trailing’ or ‘leading’) Returns: Segment value, prepended/suffixed with a forward slash, or a slash if not found Return type: string This method is almost identical to segment(), except it adds a trailing and/or leading slash based on the second parameter. If the parameter is not used, a trailing slash added. Examples: $this->uri->slash_segment(3); $