鸡生蛋,蛋生鸡。
解决PHP5.x生成Session的问题,纠缠数日。
Warning
As of PHP 5.0.5 the
write
andclose
handlers are called after object destruction and therefore cannot use objects or throw exceptions. Exceptions are not able to be caught since will not be caught nor will any exception trace be displayed and the execution will just cease unexpectedly. The object destructors can however use sessions.It is possible to call session_write_close() from the destructor to solve this chicken and egg problem but the most reliable way is to register the shutdown function as described above.
Leave a comment
| Trackback