You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ss-panel-v3-mod_Uim2/app/Utils/Cookie.php

26 lines
478 B
PHP

<?php
namespace App\Utils;
class Cookie
{
public static function set($arg, $time)
{
foreach ($arg as $key => $value) {
setcookie($key, $value, $time, '/');
}
}
public static function setwithdomain($arg, $time, $domain)
{
foreach ($arg as $key => $value) {
setcookie($key, $value, $time, '/', $domain);
}
}
public static function get($key)
{
return $_COOKIE[$key] ?? '';
}
}