테스트 사이트 - 개발 중인 베타 버전입니다

초보자 입니다 고수님들 오류봐주세 채택완료

waerhtlwekrjhd 2년 전 조회 1,436

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

</strong></p>

<p><b><?php

if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가</b></p>

<p><b>if(defined('G5_THEME_PATH')) {

    require_once(G5_THEME_PATH.'/head.php');

    return;

}</b></p>

<p><b>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');

?></b></p>

<p><b><header id="hd">

    <h1 id="hd_h1"><?php echo $g5['title'] ?></h1></b></p>

<p><b>    <div class="to_content"><a href="#container">본문 바로가기</a></div></b></p>

<p><b>    <?php

    if(defined('_INDEX_')) { // index에서만 실행

        include G5_MOBILE_PATH.'/newwin.inc.php'; // 팝업레이어

    } ?></b></p>

<p><b>    <div id="hd_wrapper"></b></p>

<p><b>        <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></b></p>

<p><b>        <a href="/bbs/search.php" id="search_open"><i class="fa fa-search" aria-hidden="true"></i></a></b></p>

<p><b>        <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></b></p>

<p><b>            <?php echo outlogin('basic'); // 외부 로그인 ?></b></p>

<p><b>            <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" />
中国语</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" />
한국어</a></li>

                <li class="hd_nb1"><a href="<?=$lang['nv_link'][10]?>" id="snb_cnt"><i class="fa fa-child" aria-hidden="true"></i>
<?=$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>
<?=$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" />
<?=$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" />
<?=$lang['nv_name'][$i]?></a></li>

                    <? }?>

                <? } ?>

            </ul>

        </div></b></p>

<p><b>        <script>

        jQuery(function ($) {</b></p>

<p><b>            $(".hd_opener").on("click", function(e) {

                var $this = $(this);

                var $hd_layer = $this.next(".hd_div");</b></p>

<p><b>                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();</b></p>

<p><b>                    $hd_layer.show();

                    $this.find("span").text("닫기");

                }

            });</b></p>

<p><b>            $(".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></b></p>

<p><b><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></b></p>

<p><b><div id="wrapper"></b></p>

<p><b>    <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'); ?></b></p>

<p><strong>

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
2년 전

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

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

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

w
waerhtlwekrjhd
2년 전
어떻게 수정하면 될가요
이글로
2년 전
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

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

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인