Cookie.php 385 B

123456789101112131415
  1. <?php
  2. class Cookie{
  3. public static function set($key, $val, $expire = 0, $path = "", $domain = "", $secure = false, $httpOnly = false){
  4. return setcookie($key, $val, $expire, $path, $domain, $secure, $httpOnly);
  5. }
  6. public static function get($key){
  7. return isset($_COOKIE[$key]) ? $_COOKIE[$key] : null;
  8. }
  9. public static function del($key){
  10. return self::set($key, "");
  11. }
  12. }