Home  >  Article  >  Backend Development  >  How to delete and set cookies in CodeIgniter, codeignitercookie_PHP tutorial

How to delete and set cookies in CodeIgniter, codeignitercookie_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 09:57:41741browse

CodeIgniter's method of deleting and setting cookies, codeignitercookie

This article describes how CodeIgniter deletes and sets cookies. Share it with everyone for your reference. The details are as follows:

$cookie = array(
  'name'  => 'loggedin',
  'value' => 'yes',
  'expire' => '86500',
  'domain' => '.apol0829.dev',
  'prefix' => 'apollidon_'
  );
set_cookie($cookie);
$cookie = array(
  'name'  => 'loggedin',
  'value' => '',
  'expire' => '0',
  'domain' => '.apol0829.dev',
  'prefix' => 'apollidon_'
  );
delete_cookie($cookie);

I hope this article will be helpful to everyone’s PHP programming based on the CodeIgniter framework.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/980229.htmlTechArticleCodeIgniter's method of deleting and setting cookies, codeignitercookie This article describes how CodeIgniter deletes and sets cookies. Share it with everyone for your reference. The details are as follows: $coo...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn