샾의 상품진열...또 질문드리네요... > 그누3질답

그누3질답

샾의 상품진열...또 질문드리네요... 정보

그샵 샾의 상품진열...또 질문드리네요...

본문

그누의 메인에 그샾 상품을 올려놓는데  에러가 납니다.
전 메인에 헌터의 최신글을 올려놓았는데 그것 때문에 에러가 나는 것 같습니다.
main.php의
--------------------------------------
include "./hunter/hunter.lib.php";
$ht = new Hunter_;
----------------------------------------
이부분을 삭제하면 에러가 나지 않는군요.
같이 쓸 방법이 없을까요?

head.php
<?
/*
    사용자 화면 상단과 좌측을 담당하는 페이지입니다.
    상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
*/
include "./$cfg[bbs_dir]/gblayer.php";
?>

main.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

define("_DOCTYPE_", "DESIGN");

$html_title = "그누보드3";

include "./lib/latest.lib.php";
include "./hunter/hunter.lib.php";
$ht = new Hunter_;
// 쇼핑몰
$is_shop = false;
if (file_exists($cfg[shop_dir])) {
include "./$cfg[shop_dir]/shop.lib.php";
$is_shop = true;
}
?>

Fatal error: Cannot redeclare item_img() (previously declared in /home/52/educt53/www/hunter/hunter.lib.php:68) in /home/52/educt53/www/shop/shop.lib.php on line 220

hunter.lib.php의 68번째 라인시작입니다.
function item_img($img, $width=0, $height=0, $noimage="a", $align="")
{
    global $cfg;
    global $current_url;

    if (!$current_url) { $current_url = "."; }

    $str = "";
    if (file_exists("./hunter/images/$img") && $img) {
        if (!$width && !$height) {
            $size = getimagesize("./hunter/images/$img");
            $width = $size[0];
            $height = $size[1];
        }
        $str .= "<span id=$img style='position:relative; width:$width; height:$height; overflow:hidden'>";
        $str .= "<span style='position:absolute; left:0; top:0; z-index:0'><img src='$current_url/hunter/images/$img' border=0 width='$width' height='$height' align='$align'></span>";
        $str .= "<span style='position:absolute; left:0; top:0; z-index:100'><img src='$current_url/hunter/images/blank.gif' border=0 width='$width' height='$height' align='$align'></span>";
        $str .= "</span>";
    } else {
        $str .= "<img src='$current_url/hunter/images/noimage.gif' border=0 width='$width' height='$height' align='$align'>";
    }
    return $str;
}

shop.lib.php 의 220 번째 라인 시작입니다.
function item_img($img, $width=0, $height=0, $noimage="a", $align="")
{
    global $cfg;
    global $current_url;

    if (!$current_url) { $current_url = "."; }

    $str = "";
    if (file_exists("./$cfg[shop_dir]/img/item/$img") && $img) {
        if (!$width && !$height) {
            $size = getimagesize("./$cfg[shop_dir]/img/item/$img");
            $width = $size[0];
            $height = $size[1];
        }

[이 게시물은 관리자님에 의해 2003-11-25 11:28:15 그샵질답(으)로 부터 이동됨]
  • 복사

댓글 전체

해결했습니다... 뚫어져라 쳐다보니까...헌터하구 샾하구... 함수이름이 똑같네요...-,.-
헌터의 함수이름을 바꿔주니까 되는군요...
7쟁이님 너무나 감사합니다.~~~

술 사드릴 분들 목록에 한분 추가~!

좋은 날 되십시요~
© SIRSOFT
현재 페이지 제일 처음으로