我有网站,我需要使用WordPress的单页,因为我需要一些来自WordPress的插件。应用程序文件夹外的代码签名会话?
我唯一的问题是从wordpress调用$ _SESSION ['email'],即使我在codeignitier模型中设置它。
public_html
application
model
User_Model.php
wordpress
wp-content
themes
twentyfourteen
header.php
所以我从什么是User_Model.php定义由
$newdata = array(
'email' => $rows->user_email,
'logged_in' => TRUE,
);
}
$this->session->set_userdata($newdata);
$_SESSION['email'] = $newdata['email'];
$_SESSION['logged_in'] = $newdata['logged_in'];
我可以以某种方式获取用户数据或$ _SESSION变量之外CI的header.php呼叫会话想要的吗?
谢谢你,这样,你让我想起了在session_start(),我忘了。 – DocNet
@DocNet没关系,如果这对你有帮助,那么请你批准我的答案。 :) –
当然!谢谢。 – DocNet