array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'function.setrawcookie.php', 1 => 'setrawcookie', 2 => 'Send a cookie without urlencoding the cookie value', ), 'up' => array ( 0 => 'ref.network.php', 1 => 'Network Funzioni', ), 'prev' => array ( 0 => 'function.setcookie.php', 1 => 'setcookie', ), 'next' => array ( 0 => 'function.socket-get-status.php', 1 => 'socket_get_status', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/network/functions/setrawcookie.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

setrawcookie

(PHP 5, PHP 7, PHP 8)

setrawcookieSend a cookie without urlencoding the cookie value

Descrizione

setrawcookie(
    string $name,
    string $value = ?,
    int $expires_or_options = 0,
    string $path = ?,
    string $domain = ?,
    bool $secure = false,
    bool $httponly = false
): bool

Alternative signature available as of PHP 7.3.0 (not supported with named parameters):

setrawcookie(string $name, string $value = ?, array $options = []): bool

setrawcookie() is exactly the same as setcookie() except that the cookie value will not be automatically urlencoded when sent to the browser.

Elenco dei parametri

For parameter information, see the setcookie() documentation.

Valori restituiti

Restituisce true in caso di successo, false in caso di fallimento.

Log delle modifiche

Versione Descrizione
7.3.0 An alternative signature supporting an options array has been added. This signature supports also setting of the SameSite cookie attribute.

Vedere anche: