PHP 매뉴얼
이전 |  | 다음

# session_regenerate_id

(PHP 4 >= 4.3.2, PHP 5)

session_regenerate_id -- Update the current session id with a newly generated one

## Description

bool session_regenerate_id ( void )

session_regenerate_id() will replace the current session id with a new one, and keep the current session information.

성공일 경우 `TRUE`를, 실패일 경우 `FALSE`를 반환합니다.

예 1. A session_regenerate_id() example

`<?php session_start(); $old_sessionid = session_id(); session_regenerate_id(); $new_sessionid = session_id(); echo "Old Session: $old_sessionid<br />"; echo "New Session: $new_sessionid<br />"; print_r($_SESSION); ?>`

> 참고: As of PHP 4.3.3, if session cookies are enabled, use of session_regenerate_id() will also submit a new session cookie with the new session id.

See also session_id(), session_start(), and session_name().

이전 | 처음으로 | 다음
session_name | 위로 | session_register