且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Wordpress中使用session_start?

更新时间:2023-12-03 23:09:46

将您的代码移动到header.php文件的顶部. 并检查会话是否已经存在:

Move your code to the top of header.php file. And check if session already exists:

if(session_id() == '')
     session_start(); 

your code here...