implementation of ajax status check

↘锁芯ラ 提交于 2019-12-05 19:18:55

I don't see anything inherently wrong with the approach that you are proposing.

But if your machine has APC installed you can use apc_store and apc_fetch to store your status in a sort of shared memory instead of writing to disk. Use something like apc_store(SID, 'login not started') to initialize and update the request state in memory, then apc_fetch(SID) to retrieve it on subsequent requests.

There are other shared memory systems, including Apache, or even a database connection might be simpler.

I have same problem and think the trick is session_write_close() that frees the session file.

Please see my https://github.com/jlaso/MySession repository and check if this can be apply to your particular question.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!