开发者

Start session for second time or?

开发者 https://www.devze.com 2023-02-10 13:05 出处:网络
<?php session_start(); ... ?> <?p开发者_Python百科hp session_start(); ?> If I have some php script like this one. My question is should I escape to start session for second time or it
<?php 
   session_start();
   ...
?>

<?p开发者_Python百科hp 
   session_start();
?>

If I have some php script like this one. My question is should I escape to start session for second time or it is necessary?


You need not to start it again. As of now, calling session_start() while the session has already been started will result in an error of level E_NOTICE. Also, the second session start will simply be ignored.

0

精彩评论

暂无评论...
验证码 换一张
取 消