如果我执行:
die();
还会有效地打电话
session_write_close();
因为模具停止了整个过程?
不,你可以在PHP页面看到:
http://www.php.net/manual/en/function.exit.php(因为die相当于退出)
原文链接:https://www.f2er.com/php/131060.htmlShutdown functions and object destructors will always be executed
even if exit is called.
但是,session_write_close不是关机功能.如果你“死”,它不会运行.我建议你看看session_register_shutdown.这将注册session_write_close()作为关闭功能,在这种情况下,它将运行在“die”上.
更多信息:http://www.php.net/manual/en/function.session-register-shutdown.php