Because setcookie () defines a cookie that will be sent along with the rest of the HTTP headers. This is a completely different thing than session_start () , for example. creating a session or resuming the current one based on the session identifier transmitted through a GET or POST request, or transmission through a cookie.
- , $_COOKIE $_GET $_POST, session_save_path, $_SESSION, , , , setcookie .
. " PHP" .
< > . @Felix , . , : session_start () , setcookie , .
>