팝업관리 스킨을 달았는데 또 문제네요.ㅡㅡ; 정보
팝업관리 스킨을 달았는데 또 문제네요.ㅡㅡ;본문
팝업창 관리를 이번엔 설치했는데..
메인에 에러가 뜨네요.
위 스킨을 사용했거든요.
그런데, 아래와 같은 메세지가 나오네요.
분명히 위 스킨을 설치하고 하라는데로 했거든요.
왜 이런 문제가 뜨는지 알수가 없네요..ㅡ.ㅡ;
Warning: main(../../../common.php) [function.main]: failed to create stream: No such file or directory in /home/hosting_users/wdesigner/www/skin/popup/basic/popup.php on line 3
Warning: main() [function.main]: Failed opening '../../../common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/wdesigner/www/skin/popup/basic/popup.php on line 3
window.open( './skin/popup/basic/autoPOPUP.php?idx=1', 'popup_nIdx1', 'scrollbars=no,width=500,height=427,left=0,top=0, status=no');
Warning: main() [function.main]: Failed opening '../../../common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/wdesigner/www/skin/popup/basic/popup.php on line 3
window.open( './skin/popup/basic/autoPOPUP.php?idx=1', 'popup_nIdx1', 'scrollbars=no,width=500,height=427,left=0,top=0, status=no');
보아하니 popup.php 파일에서 문제인것 같은데.
아래는 popuup.php 파일 소스 입니다.
<?
if(!isset($g4_path)) $g4_path = "../../..";
include_once("$g4_path/common.php");
if(!isset($g4_path)) $g4_path = "../../..";
include_once("$g4_path/common.php");
// 팝업 대상 목록 가져오기 - 시작 //
$nNow = time();
$szSql = "
SELECT nIdx, nStartDate, nEndDate, nWidth, nHeight, nLeft, nRight , nOptions
FROM $g4[popup_table]
WHERE szView='Y' AND ($nNow BETWEEN nStartDate AND nEndDate)
ORDER BY nIdx asc
";
$nNow = time();
$szSql = "
SELECT nIdx, nStartDate, nEndDate, nWidth, nHeight, nLeft, nRight , nOptions
FROM $g4[popup_table]
WHERE szView='Y' AND ($nNow BETWEEN nStartDate AND nEndDate)
ORDER BY nIdx asc
";
$input = mysql_query($szSql);
$dataArray = array ();
for ($i = 0; $i < mysql_num_fields($input); $i ++) {
array_push($dataArray, mysql_field_name($input, $i));
}
$fieldArray =$dataArray;
for ($i = 0; $i < mysql_num_fields($input); $i ++) {
array_push($dataArray, mysql_field_name($input, $i));
}
$fieldArray =$dataArray;
$returnArray = array ();
$onerowArray = array ();
$onerowArray = array ();
while ($row = mysql_fetch_row($input)) {
for ($j = 0; $j < sizeof($fieldArray); $j ++) {
//$onerowArray = array_merge($onerowArray, array( $fieldArray[$j] => $row[$fieldArray[$j]] ));
$onerowArray = array_merge($onerowArray, array ($fieldArray[$j] => $row[$j]));
}
array_push($returnArray, $onerowArray);
}
$onerowArray = '';
$arrPOP = $returnArray;
//print_r($arrPOP);
// 팝업 대상 목록 가져오기 - 끝
// 목록에 따라, 새창 띄우기
for ( $i=0; $i < count($arrPOP); $i++){
if ($arrPOP[$i]["nIdx"])
{
$cookieName = "g4_popup_idx".$arrPOP[$i]["nIdx"];
if ($_COOKIE[$cookieName] != "done")
{
$szWidth = $arrPOP[$i][nWidth];
$szHeight = $arrPOP[$i][nHeight] + 27;
$szLeft = $arrPOP[$i][nLeft];
$szRight = $arrPOP[$i][nRight];
$options = $arrPOP[$i][nOptions];
for ($j = 0; $j < sizeof($fieldArray); $j ++) {
//$onerowArray = array_merge($onerowArray, array( $fieldArray[$j] => $row[$fieldArray[$j]] ));
$onerowArray = array_merge($onerowArray, array ($fieldArray[$j] => $row[$j]));
}
array_push($returnArray, $onerowArray);
}
$onerowArray = '';
$arrPOP = $returnArray;
//print_r($arrPOP);
// 팝업 대상 목록 가져오기 - 끝
// 목록에 따라, 새창 띄우기
for ( $i=0; $i < count($arrPOP); $i++){
if ($arrPOP[$i]["nIdx"])
{
$cookieName = "g4_popup_idx".$arrPOP[$i]["nIdx"];
if ($_COOKIE[$cookieName] != "done")
{
$szWidth = $arrPOP[$i][nWidth];
$szHeight = $arrPOP[$i][nHeight] + 27;
$szLeft = $arrPOP[$i][nLeft];
$szRight = $arrPOP[$i][nRight];
$options = $arrPOP[$i][nOptions];
$scrollbar = ($options == "Y") ? "scrollbars=yes" : "scrollbars=no";
$optionsS = $scrollbar.",width=".$szWidth.",height=".$szHeight.",left=".$szLeft.",top=".$szRight.", status=no";
$optionsS = $scrollbar.",width=".$szWidth.",height=".$szHeight.",left=".$szLeft.",top=".$szRight.", status=no";
echo "\r\n<script language='javascript'>\r\n\t window.open( '".$g4[path]."/skin/popup/basic/autoPOPUP.php?idx=".$arrPOP[$i]["nIdx"]."', 'popup_nIdx".$arrPOP[$i]["nIdx"]."', '".$optionsS."'); \r\n</script>";
}
}
}
?>
}
}
}
?>
3번줄이 문제인듯한데 ..include_once("$g4_path/common.php"); 이거든요.
어디가 문제있나요?
댓글 전체
경로 문제인 듯합니다.
알맞은 경로로 변경해 보세요.
알맞은 경로로 변경해 보세요.
확답은 아닙니다만, 몇가지 스킨들의 경우에 경로설정이 문제가 되는데 g3에서 g4가 되면서 그누보드의 패스가 $g4_path 인것들중에 일부는 $g4[path]로 수정해야하는 문제가 생기더라구요 저도 최근에 가입한 회원을 출력하는 스킨을 사용해보았는데 아무리 만져도 안되던게 경로가 문제더군요, 일단 g4가 설치된 위치를 확인하시고 _common.php도 확인하셔야할테지만 g4_path부분을 수정해보시길 권합니다. 저도 초보지만 일부 스킨들중 그누보드가 버전업되면서 경로표시가 좀 달라진게 있는거같더라구요,
http://www.js3005.com 저도 작업중이에요 정보공유 부탁 ^_^
http://www.js3005.com 저도 작업중이에요 정보공유 부탁 ^_^
popup.php 파일 제일 상단의
소스를
<?
if(!isset($g4_path)) $g4_path = ".";
이렇게 바꿔보시겠어요? 이 경로가 문제가 되는 듯 합니다.
소스를
<?
if(!isset($g4_path)) $g4_path = ".";
이렇게 바꿔보시겠어요? 이 경로가 문제가 되는 듯 합니다.
감사합니다. 해결되었습니다.^^