초보자 입니다 고수님들 오류봐주세

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
초보자 입니다 고수님들 오류봐주세

QA

초보자 입니다 고수님들 오류봐주세

본문

Warning: Use of undefined constant bo_table - assumed 'bo_table' (this will throw an Error in a future version of PHP) in /www/wwwroot/job1009.com/mobile/head.php on line 113

Warning: Use of undefined constant bo_table - assumed 'bo_table' (this will throw an Error in a future version of PHP) in /www/wwwroot/job1009.com/mobile/head.php on line 113

Warning: Use of undefined constant bo_table - assumed 'bo_table' (this will throw an Error in a future version of PHP) in /www/wwwroot/job1009.com/mobile/head.php on line 113

Warning: Use of undefined constant bo_table - assumed 'bo_table' (this will throw an Error in a future version of PHP) in /www/wwwroot/job1009.com/mobile/head.php on line 113


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if(defined('G5_THEME_PATH')) {
    require_once(G5_THEME_PATH.'/head.php');
    return;
}
include_once(G5_PATH.'/head.sub.php');
include_once(G5_LIB_PATH.'/language.lib.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
include_once(G5_LIB_PATH.'/outlogin.lib.php');
include_once(G5_LIB_PATH.'/poll.lib.php');
include_once(G5_LIB_PATH.'/visit.lib.php');
include_once(G5_LIB_PATH.'/connect.lib.php');
include_once(G5_LIB_PATH.'/popular.lib.php');
?>
<header id="hd">
    <h1 id="hd_h1"><?php echo $g5['title'] ?></h1>
    <div class="to_content"><a href="#container">본문 바로가기</a></div>
    <?php
    if(defined('_INDEX_')) { // index에서만 실행
        include G5_MOBILE_PATH.'/newwin.inc.php'; // 팝업레이어
    } ?>
    <div id="hd_wrapper">
        <div id="logo">
            <a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/mobile/logo.png" alt="<?php echo $config['cf_title']; ?>"></a>
        </div>
        
        <div id="navi">
            <div class="slider_wrap line">
                <div class="wx_items">
                    <? for($i=0;$i<count($lang['nv_name']);$i++){ ?>
                    <div class="item_cell"><span><a href="<?=$lang['nv_link'][$i]?>" target="_<?=$lang['nv_target'][$i]?>"><img src="<?php echo G5_IMG_URL ?>/icon<?=$i?>.png" /> <?=$lang['nv_name'][$i]?></a></span></div>
                    <? } ?>
                </div>
             </div>
        </div>
        <a href="/bbs/search.php" id="search_open"><i class="fa fa-search" aria-hidden="true"></i></a>
        <button type="button" id="user_btn" class="hd_opener"><i class="fa fa-bars" aria-hidden="true"></i><span class="sound_only">사용자메뉴</span></button>
        <div class="hd_div" id="user_menu">
            <button type="button" id="user_close" class="hd_closer"><span class="sound_only">메뉴 </span>닫기</button>
            <?php echo outlogin('basic'); // 외부 로그인 ?>
            <ul id="hd_nb">
                <li class="hd_nb1"><a href="<?php echo lang_change_url('zh'); ?>" id="snb_qa"><img src="<?php echo G5_IMG_URL ?>/zh.png" /><br>中国语</a></li>
                <li class="hd_nb2"><a href="<?php echo lang_change_url('kr'); ?>" id="snb_faq"><img src="<?php echo G5_IMG_URL ?>/kr.png" /><br>한국어</a></li>
                <li class="hd_nb1"><a href="<?=$lang['nv_link'][10]?>" id="snb_cnt"><i class="fa fa-child" aria-hidden="true"></i><br><?=$lang['member_m_bname1']?></a></li>
                <li class="hd_nb2"><a href="<?=$lang['nv_link'][11]?>" id="snb_new" target="_blank"><i class="fa fa-film" aria-hidden="true"></i><br><?=$lang['member_m_bname2']?></a></li>
                <? for($i=0;$i<count($lang['nv_name']);$i++){ ?>
                    <?
                    if($i%2){
                    ?>
                    <li class="hd_nb2"><a href="<?=$lang['nv_link'][$i]?>" target="_<?=$lang['nv_target'][$i]?>"><img src="<?php echo G5_IMG_URL ?>/icon00<?=$i?>.png" /><br><?=$lang['nv_name'][$i]?></a></li>
                    <?
                    }else{
                    ?>
                    <li class="hd_nb1"><a href="<?=$lang['nv_link'][$i]?>" target="_<?=$lang['nv_target'][$i]?>"><img src="<?php echo G5_IMG_URL ?>/icon00<?=$i?>.png" /><br><?=$lang['nv_name'][$i]?></a></li>
                    <? }?>
                <? } ?>
            </ul>
        </div>
        <script>
        jQuery(function ($) {
            $(".hd_opener").on("click", function(e) {
                var $this = $(this);
                var $hd_layer = $this.next(".hd_div");
                if($hd_layer.is(":visible")) {
                    $hd_layer.hide();
                    $this.find("span").text("열기");
                } else {
                    var $hd_layer2 = $(".hd_div:visible");
                    $hd_layer2.prev(".hd_opener").find("span").text("열기");
                    $hd_layer2.hide();
                    $hd_layer.show();
                    $this.find("span").text("닫기");
                }
            });
            $(".hd_closer").on("click", function(e) {
                var idx = $(".hd_closer").index($(this));
                $(".hd_div:visible").hide();
                $(".hd_opener:eq("+idx+")").find("span").text("열기");
            });
        });
        </script>
        
    </div>
</header>
<div class="top_banner">
    <section id="features">
        <div class="content">
            <div class="slider center">
            <?
            $sql = " select bo_table, wr_id, bf_file from g5_board_file where bo_table = 'a1' and bf_no = '1' order by wr_id desc ";
            $query = sql_query($sql);
            
            while($row = sql_fetch_array($query)){
    
                $bf_link = sql_fetch(" select wr_link1 from g5_write_a1 where wr_id = '{$row[wr_id]}' "); //분류 코드
            ?>
                <div><a href="<?=$bf_link['wr_link1']?>"><img src="/data/file/<?=$row['bo_table']?>/<?=$row['bf_file']?>" data-src="/data/file/<?=$row['bo_table']?>/<?=$row['bf_file']?>" /></a></div>
            <? } ?>
            </div>
        </div>
    </section>
</div>
<div id="wrapper">
    <div id="container">
    <? include_once(G5_PATH.'/notice.php'); ?>
    
    <?php if (!defined("_INDEX_")) { ?>
    <h2 id="container_title" class="top" title="<?php echo $lang['bd_title']; ?>">
        <? if($bo_table){ ?>
        
            <?php echo $lang['bd_title']; ?>
            
        <? }else if($_SERVER['PHP_SELF'] == '/bbs/search.php'){ ?>
        
            <?php echo $lang['sh_result_title']; ?>
            
        <? }else if($_SERVER['PHP_SELF'] == '/bbs/register_form.php'){ ?>
        
            <?php echo $lang['result_title']; ?>
            
       <? } ?>
    </h2>
    <?php } ?>
    <? include_once(G5_MOBILE_PATH.'/category.php'); ?>

이 질문에 댓글 쓰기 :

답변 1

113번째줄에 $bo_table이 정의되지 않는 변수라는데요?

if($bo_table) 부분 확인해보셔야할듯

echo $bo_table이나 print_r($bo_table)로 찍어보시고
아무것도 나오지 않는다면 값을 넣어주거나 다른 조건을 주셔야겠죠,
게시판일때만 저 조건을 사용하고 싶으신거 같은데
하단에 사용된
else if($_SERVER['PHP_SELF'] == '/bbs/search.php')
처럼 응용해서 하셔야할거 같아요

참고하세요
https://zxchsr.tistory.com/222
https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=crew3&logNo=220830676094

현재 주소랑 비교해서 조건문을 실행시키면 될겁니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 2,667
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT