php session_start with include files

后端 未结 5 1169
遇见更好的自我
遇见更好的自我 2020-12-06 17:03

i learned a lot about session start from my previous question. Now i\'m wondering how session locking occurs when files are included in other files. Lets say i have:

5条回答
  •  鱼传尺愫
    2020-12-06 17:41

    I would recommend creating a session.php file that you would include once, at the first line of each page. That way, the session is handled in ONE file, in case you need to change validation or session settings (and don't need to worry about your question).

提交回复
热议问题