更新时间:2023-12-03 23:27:52
我已将我的原始答案更改为@rafi 的正确答案(见下文).
I've changed my original answer to the correct one from @rafi (see below).
在您的functions.php文件中写入以下代码:
Write the following code in your functions.php file:
function register_my_session()
{
if( !session_id() )
{
session_start();
}
}
add_action('init', 'register_my_session');