对于已清除定义并正常工作的功能,我收到了致命错误。即使它完成了它的工作,它仍然说它是“未定义的”。以前有人经历过吗?
/include/adminbar.php
<?php if (is_logged_in()) : ?>
<div id="globaluserbar" class="gobaluseradminbar" style="position:fixed; top:0px; left:0px; background:#292929; height:42px; width:100%; color:white; vertical-align:middle;">This is the adminbar</div>
<?php endif; ?>
/include/functions.php
function is_logged_in(){
if (!empty($_SESSION[SESSION_IS_LOGGEDIN]) && $_SESSION[SESSION_IS_LOGGEDIN] == 1) {
return true;
}
}
function theme_header(){
include URLBASE."/includes/theme-inc/head.php";
include URLBASE."/content/themes/default/header.php";
}
function theme_footer(){
include URLBASE."/content/themes/default/footer.php";
include URLBASE."/includes/adminbar.php";
include URLBASE."/includes/theme-inc/foot.php";
}
/index.php
<?php theme_header(); ?>
<p>This is the main index!</p>
<?php theme_footer(); ?>
所有其他的东西不应该有一个因素。
index.php 上的错误指出
致命错误:在第 1 行的 C:\xampp\htdocs\ionz\2.0\includes\adminbar.php 中调用未定义函数 is_logged_in()