Method: cookie::set

Set a new cookie

Info

Syntax

cookie::set($key, $value, $expires=3600, $domain='/')

Parameters

Return (boolean)

true: the cookie has been created, false: cookie creation failed

Example


cookie::set('mycookie', 'hello', 3600);
// expires in 1 hour