PHP & Sessions: Is there any way to disable PHP session locking?

后端 未结 7 1451
感动是毒
感动是毒 2020-11-30 07:44

Is there any way to disable the session locking in PHP while using the default session handler?

[EDIT:] Or is there at least a way to restart a session after callin

7条回答
  •  离开以前
    2020-11-30 08:22

    You can restart the session by recalling session_start() after session_write_close(). However this will cause multiple SIDS. I resolve this by removing the multiple SIDS from the header before the output is flushed.

    See this example: https://gist.github.com/CMCDragonkai/6912726#file-nativesession-php-L254

提交回复
热议问题