定義がクリアされ、正しく動作している関数に対して致命的なエラーが発生します。ジョブは実行されますが、まだ「未定義」であると表示されます。誰もそれを経験したことがありますか?
/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() の呼び出し