최근 게시글 추출 정보
최근 게시글 추출본문
다름아니라 최근게시물 추출 경로 문제가 생겨서 질문 드립니다..
최상위 디렉토리의 index.html 에서는 문제없이 추출되는데요,
한단계 아래의 (예: /two) 폴더안의 index.html 에서는 추출이 안되네요..
/two/index.html 에 삽입한 소스 입니다.
<?
include_once "/_common.php";
include_once "/lib/latest.lib.php";
?>
<div><?=latest("basic", news, 4, 34, 1);?></div>
인클루드 경로가 문제인거 같은데.. 당췌 안되네요..도와주세요..
최상위 index.html 파일에 위와 같이 넣으면 정상 추출이 됩니다..
_common.php 내용
<?
$g4_path = "."; // common.php 의 상대 경로
include_once("$g4_path/common.php");
?>
최상위 디렉토리의 index.html 에서는 문제없이 추출되는데요,
한단계 아래의 (예: /two) 폴더안의 index.html 에서는 추출이 안되네요..
/two/index.html 에 삽입한 소스 입니다.
<?
include_once "/_common.php";
include_once "/lib/latest.lib.php";
?>
<div><?=latest("basic", news, 4, 34, 1);?></div>
인클루드 경로가 문제인거 같은데.. 당췌 안되네요..도와주세요..
최상위 index.html 파일에 위와 같이 넣으면 정상 추출이 됩니다..
_common.php 내용
<?
$g4_path = "."; // common.php 의 상대 경로
include_once("$g4_path/common.php");
?>
댓글 전체
/two/index.html
<?
$g4_path = "..";
include_once("$g4_path/common.php");
include_once("../lib/latest.lib.php");
?>
...
이렇게 해보세요..
<?
$g4_path = "..";
include_once("$g4_path/common.php");
include_once("../lib/latest.lib.php");
?>
...
이렇게 해보세요..