array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'swoole-http-response.cookie.php', 1 => 'Swoole\\Http\\Response::cookie', 2 => 'Set the cookies of the HTTP response.', ), 'up' => array ( 0 => 'class.swoole-http-response.php', 1 => 'Swoole\\Http\\Response', ), 'prev' => array ( 0 => 'class.swoole-http-response.php', 1 => 'Swoole\\Http\\Response', ), 'next' => array ( 0 => 'swoole-http-response.destruct.php', 1 => 'Swoole\\Http\\Response::__destruct', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/swoole/swoole/http/response/cookie.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

Swoole\Http\Response::cookie

(PECL swoole >= 1.9.0)

Swoole\Http\Response::cookieSet the cookies of the HTTP response.

说明

public Swoole\Http\Response::cookie(
    string $name,
    string $value = ?,
    string $expires = ?,
    string $path = ?,
    string $domain = ?,
    string $secure = ?,
    string $httponly = ?
): string

参数

name

value

expires

path

domain

secure

httponly

返回值