Whether to hide the cookie from JavaScript

 

w禁用js访问特定cookie。

https://codeigniter.com/userguide3/helpers/cookie_helper.html

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

Available Functions

The following functions are available:

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

posted @ 2017-02-06 16:06  papering  阅读(153)  评论(0编辑  收藏  举报