set_cookie($name[, $value = ''[, $expire = ''[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = FALSE[, $httponly = FALSE]]]]]]])
Parameters: |
-
$name (mixed) – Cookie name or associative array of all of the parameters available to this function
-
$value (string) – Cookie value
-
$expire (int) – Number of seconds until expiration
-
$domain (string) – Cookie domain (usually: .yourdomain.com)
-
$path (string) – Cookie path
-
$prefix (string) – Cookie name prefix
-
$secure (bool) – Whether to only send the cookie through HTTPS
-
$httponly (bool) – Whether to hide the cookie from JavaScript
|
---|
Return type: |
void |
---|
This helper function gives you friendlier syntax to set browser cookies. Refer to the Input Library for a description of its use, as this function is an alias for CI_Input::set_cookie()
.
Please login to continue.