Destroy files when session will destroy in php -


is possible remove files folder when session destroy. doing when user come site , can upload files(images, or textfiles), etc.. out login site. , files 'll store project's folder. need if user quits browser out login need delete files upload in project folder. how ?

thanks in advance.

you can implementing own session handler. way, can define callback various events, including destruction of session. see link more information:

http://www.php.net/manual/en/function.session-set-save-handler.php

update: problem solution need implement rest of session handling code (initialize session, close session, read storage, write, garbage collect). however, linked page above gives full example can add functionality to.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -