6163银河.net163.am

Toggle Table of Contents

CodeIgniter User Guide Version 2.2.6


Cookie Helper

The Cookie Helper file contains functions that assist in working with cookies.

Loading this Helper

This helper is loaded using the following code:

$this->load->helper('cookie');

The following functions are available:

set_cookie()

This helper function gives you view file friendly syntax to set browser cookies. Refer to the Input class for a description of use, as this function is an alias to $this->input->set_cookie().

get_cookie()

This helper function gives you view file friendly syntax to get browser cookies. Refer to the Input class for a description of use, as this function is an alias to $this->input->cookie().

delete_cookie()

Lets you delete a cookie. Unless you've set a custom path or other values, only the name of the cookie is needed:

delete_cookie("name");

This function is otherwise identical to set_cookie(), except that it does not have the value and expiration parameters. You can submit an array of values in the first parameter or you can set discrete parameters.

delete_cookie($name, $domain, $path, $prefix)

Previous Topic:  CAPTCHA Helper    ·   Top of Page   ·   User Guide Home   ·   Next Topic:  Date Helper

CodeIgniter  ·  Copyright © 2006 - 2014  ·  EllisLab, Inc.  ·  Copyright © 2014 - 2015  ·  British Columbia Institute of Technology

网站地图