Click to See Complete Forum and Search --> : delete file when session ends


milily
08-06-2003, 10:07 AM
Hi,

When the session ends, I want to delete the files created during the session. But I have no idea how to do it. I cannot find a function like 'session_ends()', And how can I detect a session ends or not? Thank you very much for any help.

Helen

pyro
08-06-2003, 10:23 AM
Perhaps you need sessions_destroy() (http://us3.php.net/manual/en/function.session-destroy.php)

anneveld
08-06-2003, 01:56 PM
you can always referer to :
http://www.php.net
But this would help you to unset and destroy a session.

with : session_unset();
you empty all data in the session, you can check this in the php directory sessiondata.

with : session_destroy();
you will remove the session file from the sessiondata directory.



session_start();
// Unset all of the session variables.
session_unset();
// Finally, destroy the session.
session_destroy();



good luck !
Frank