session_unset($_SESSION)

Asked

Viewed 93 times

1

Hello, the instruction session_unset($_SESSION); excludes all existing Sesssions?

I have on the local wampserver server where the session variable is in my case in the following path: c:/wamp/tmp, when I create Sessions on my pages the folder tmp takes for example a Session $_SESSION['autentica'] = '1'; with the following name: sess_qvin6nvoq52caubdumc8duq684 with the following values: authenticates|s:1:"1"; .

When I use session_unset($_SESSION); instruction deletes everything in that folder (tmp).

a- This instruction will overthrow other users who would be logged in?

b- There would be a way to only exclude the sess_qvin6nvoq52caubdumc8duq684, without erasing the others?

From what I can see in that, I think I’m doing something wrong, because when creating Sesssions, we always have something being created in that folder tmp php server, but I realized that it ends up getting files that are not deleted.

I think I’m doing something wrong in the manipulation of the Sesssions, because this kind of "filth" in the briefcase tmp server.

It is possible to avoid this?

1 answer

1

For you to keep the folder tmp without "filth", the best option is to use the session_destroy poís she destroyed all data stored during session as can be seen here!

Already the session_unset that you are using only cleans the global variable $_SESSION as seen here.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.