Home  >  Article  >  php教程  >  CodeIgniter删除和设置Cookie的方法

CodeIgniter删除和设置Cookie的方法

WBOY
WBOYOriginal
2016-06-06 20:05:21998browse

这篇文章主要介绍了CodeIgniter删除和设置Cookie的方法,涉及CodeIgniter操作cookie的技巧,非常具有实用价值,需要的朋友可以参考下

本文实例讲述了CodeIgniter删除和设置Cookie的方法。分享给大家供大家参考。具体如下:

$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);

希望本文所述对大家基于CodeIgniter框架的php程序设计有所帮助。

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