What happens if I do not call session_start ()?

I am trying to make many of the pages in my web page cache like HTML. As a result, I will not call session_start () on these pages. Are sessions running if you don't call them on every single page?

+3
source share
4 answers

If you do not call session_start(), you will not have $_SESSION. But if the page is a static html file, since you will not need it $_SESSIONfor this page, so you do not have to worry about it.

You only need this on the pages where you do something with $_SESSION

+3
source

, . session_start() , , , , html .

0

session_starts(), , . , session_start()

, ?

0

html.Then, PHP html. session_start() html . .

0

Source: https://habr.com/ru/post/1761034/


All Articles