Write session start on 1 page or all pages?

前端 未结 4 1044
盖世英雄少女心
盖世英雄少女心 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条回答
  •  梦毁少年i
    2020-12-28 16:13

    Anything that is going to access Session variables needs to start the session.

    So unless you have a php page that is non-dependent on the session than every page needs it.

提交回复
热议问题