Write session start on 1 page or all pages?

前端 未结 4 1055
盖世英雄少女心
盖世英雄少女心 2020-12-28 15:24

All the tutorials say to put session start. They don\'t say if that should be in all pages on the website, or some, or only 1.

And if it\'s only 1 page, does it h

4条回答
  •  青春惊慌失措
    2020-12-28 16:26

    You need to put this in each page that need to access the session data before accessing (or creating) any session data.

    See: http://php.net/manual/en/function.session-start.php

提交回复
热议问题