최신글 관련 다른 DB와 연동 문제입니다
원래 있던 사이트에 그누보드를 부쳐서 최신글로만 4개정도 게시판을 뽑으려
하는데요
<?
include_once("_common.php");
include_once("$g4[path]/lib/latest.lib.php");
?>
이렇게 구문을 넣었는데 자꾸 에러가
Fatal error: Cannot redeclare sql_query() (previously declared in /home1/tankrori/www/bbs/lib/common.lib.php:1030) in /home1/tankrori/www/include/lib.php on line 168 뜹니다
연동이 안되는건가요? 아님 제가 경로를 잘못 맞춘건가요??
메인 index.php 파일 소스는
<?
$sub_dir="main";
$mode=split("@",$main_mode);
if($mode[0]=="truck") {
$mode[0]="car";
}
$main="../$mode[0]/$mode[1].php";
//echo $main;
if(!file_exists($main) or !$main) {
$main="main.php";
}
if(!$main_mode) {
?>
<? include "../include/head.php" ?>
<link href="../include/style.css" rel="stylesheet" type="text/css">
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<iframe name="hidden<?=$now?>" src="" width="0" height="0"></iframe>
<table id="Table_01" width="1004" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" width="1004" height="18">
</td>
</tr>
<tr>
<td style="padding-left:5" width="214" valign="top" align="center"><? include "../include/left.php"; ?></td>
<td width="565" valign="top"><? include $main; ?></td>
<td width="208" valign="top"><? include "../include/right.php"; ?></td>
</tr>
</table>
<?
}else{
?>
<? include "../include/head.php" ?>
<link href="../include/style.css" rel="stylesheet" type="text/css">
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<iframe name="hidden<?=$now?>" src="" width="0" height="0"></iframe>
<table id="Table_01" width="1004" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" width="1004" height="18">
</td>
</tr>
<tr>
<td colspan="2" width="1004" > <? include "../include/left_1.php"; ?></td>
</tr>
<tr>
<td colspan="2" height="9"></td>
</tr>
<tr>
<td width="794" align="center" valign="top"> <? include $main; ?></td>
<td rowspan="2" align="center" valign="top" style="padding-left:10">
<? include "../include/right_1.php" ?>
</td>
</tr>
</table>
<?
}
?>
<? include "../include/bot.php"; ?>
이구요 여기에 그누보드로 최신글을 뽑으려했는데....ㅠㅠ
그누보드는 bbs/index.php 디렉토리고 메인은 main/index.php 입니다.
고수님들 도와주세여~~
하는데요
<?
include_once("_common.php");
include_once("$g4[path]/lib/latest.lib.php");
?>
이렇게 구문을 넣었는데 자꾸 에러가
Fatal error: Cannot redeclare sql_query() (previously declared in /home1/tankrori/www/bbs/lib/common.lib.php:1030) in /home1/tankrori/www/include/lib.php on line 168 뜹니다
연동이 안되는건가요? 아님 제가 경로를 잘못 맞춘건가요??
메인 index.php 파일 소스는
<?
$sub_dir="main";
$mode=split("@",$main_mode);
if($mode[0]=="truck") {
$mode[0]="car";
}
$main="../$mode[0]/$mode[1].php";
//echo $main;
if(!file_exists($main) or !$main) {
$main="main.php";
}
if(!$main_mode) {
?>
<? include "../include/head.php" ?>
<link href="../include/style.css" rel="stylesheet" type="text/css">
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<iframe name="hidden<?=$now?>" src="" width="0" height="0"></iframe>
<table id="Table_01" width="1004" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" width="1004" height="18">
</td>
</tr>
<tr>
<td style="padding-left:5" width="214" valign="top" align="center"><? include "../include/left.php"; ?></td>
<td width="565" valign="top"><? include $main; ?></td>
<td width="208" valign="top"><? include "../include/right.php"; ?></td>
</tr>
</table>
<?
}else{
?>
<? include "../include/head.php" ?>
<link href="../include/style.css" rel="stylesheet" type="text/css">
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<iframe name="hidden<?=$now?>" src="" width="0" height="0"></iframe>
<table id="Table_01" width="1004" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" width="1004" height="18">
</td>
</tr>
<tr>
<td colspan="2" width="1004" > <? include "../include/left_1.php"; ?></td>
</tr>
<tr>
<td colspan="2" height="9"></td>
</tr>
<tr>
<td width="794" align="center" valign="top"> <? include $main; ?></td>
<td rowspan="2" align="center" valign="top" style="padding-left:10">
<? include "../include/right_1.php" ?>
</td>
</tr>
</table>
<?
}
?>
<? include "../include/bot.php"; ?>
이구요 여기에 그누보드로 최신글을 뽑으려했는데....ㅠㅠ
그누보드는 bbs/index.php 디렉토리고 메인은 main/index.php 입니다.
고수님들 도와주세여~~
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 7개
근데.._common.php 이 문젠 아닌거 같아여 바까바도 안나오네여 ㅠㅠ
ㄳ드립니다.
<?
include_once("_common.php");
include_once("$g4[path]/lib/latest.lib.php");
?>
여기서 common.lib.php가 중복 되는 거 아닌가요?
include_once("_common.php"); ==>include_once("$g4_path/_common.php"); 위에 인크루드 잘못돼서 그런거 아닐까요?
ㄳ합니다~
내용이 어떤 거죠?