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

PHP7에서 Notice: Undefined variable: 에러.... 채택완료

수정이아빠 6년 전 조회 3,430

현재접속자에 아이피를 국기이미지로 표시하려는데 Notice: Undefined variable:  skin_url in connect/geoip/current_connect.skin.php on line 7

와같은 에러가납니다......

소스는 아래와같습니다.

혹시 해결방법아시는분 설명좀 정중히 부탁드리겠습니다..꾸벅

</strong></p>

<p><strong><?php

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

<p><strong>// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨

add_stylesheet('<link rel="stylesheet" href="'.$skin_url.'/style.css">', 0);</strong></p>

<p><strong>// 목록헤드

if(isset($wset['hskin']) && $wset['hskin']) {

    add_stylesheet('<link rel="stylesheet" href="'.G5_CSS_URL.'/head/'.$wset['hskin'].'.css" media="screen">', 0);

    $head_class = 'div-head list-head';

} else {

    $head_class = (isset($wset['hcolor']) && $wset['hcolor']) ? 'div-head border-'.$wset['hcolor'] : 'div-head border-black';

}</strong></p>

<p><strong>// 헤더 출력

if($header_skin)

    include_once('./header.php');</strong></p>

<p><strong>include_once(G5_PATH.'/geoip/geoip.inc');

$gi = geoip_open(G5_PATH."/geoip/GeoIP.dat",GEOIP_STANDARD);</strong></p>

<p><strong>?></strong></p>

<p><strong><div class="list-board">

    <div class="<?php echo $head_class;?>">

        <span class="num">번호</span>

        <span class="name">이름</span>

        <span class="subj">위치</span>

    </div>

    <ul id="list-container" class="board-list">

    <?php

    for ($i=0; $i<count($list); $i++) {

        $location = conv_content($list[$i]['lo_location'], 0);

        //$location = $list[$i]['lo_location'];

        // 최고관리자에게만 허용

        // 이 조건문은 가능한 변경하지 마십시오.

        if ($list[$i]['lo_url'] && $is_admin == 'super') $display_location = "<a href=\"".$list[$i]['lo_url']."\">".$location."</a>";

        else $display_location =  $location;

    ?>

        <li class="list-item">

            <div class="num">

                <?php echo $list[$i]['num'] ?>

            </div>

            <div class="name">

                <span class="ellipsis"><img src="<?php echo G5_URL?>/geoip/<?php echo geoip_country_code_by_addr($gi,$list[$i]['lo_ip'])?>.png" width='18' height='12'> <?php echo $list[$i]['name']; ?></span>

            </div>

            <div class="subj">

                <span class="ellipsis"><?php echo $display_location ?></span>

            </div>

        </li>

    <?php } ?>

    </ul>

    <?php if ($i == 0) { ?>

        <div class="none text-center text-muted">현재 접속자가 없습니다.</div>

    <?php } ?>

</div></strong></p>

<p><strong><?php if($setup_href) { ?>

    <div class="h30"></div>

    <p class="text-center">

        <a class="btn btn-color btn-sm win_memo" href="<?php echo $setup_href;?>">

            <i class="fa fa-cogs"></i> 스킨설정

        </a>

    </p>

<?php } ?></strong></p>

<p><strong><div class="h30"></div></strong></p>

<p><strong>

 

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

답변 3개

채택된 답변
+20 포인트

skin_url 이라는 변수가 초기화가 안된것 같습니다

http://blog.freezner.com/archives/474">http://blog.freezner.com/archives/474

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

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

6년 전

아무래도 안되겠어서 의뢰게시판에 의뢰하였습니다.......

관심들 가져주셔서 감사합니다......꾸벅~

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

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

$skin_url이 아니고 $board_skin_url 이거 아닐까요?

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

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

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

로그인