update : 2015.11.03
php.shukuma.com

검색:
 
 
Write session data

SessionHandlerInterface::write

(PHP 5 >= 5.4.0)

SessionHandlerInterface::writeWrite session data

설명

abstract public bool SessionHandlerInterface::write ( string $session_id , string $session_data )

Writes the session data to the session storage. Called by session_write_close(), when session_register_shutdown() fails, or during a normal shutdown. Note: SessionHandlerInterface::close() is called immediately after this function.

PHP will call this method when the session is ready to be saved and closed. It encodes the session data from the $_SESSION superglobal to a serialized string and passes this along with the session ID to this method for storage. The serialization method used is specified in the session.serialize_handler setting.

Note this method is normally called by PHP after the output buffers have been closed unless explicitly called by session_write_close()

인수

session_id

The session id.

session_data

The encoded session data. This data is the result of the PHP internally encoding the $_SESSION superglobal to a serialized string and passing it as this parameter. Please note sessions use an alternative serialization method.

반환값

반환 값(보통 성공 시 TRUE, 실패 시 FALSE). 이 값은 처리를 위해 내부적으로 PHP로 반환되는 점에 주의하십시오.

참고