최신글 추출관련 정보
최신글 추출관련본문
안녕하십니까.
이번에 처음 그루보드를 사용하면서 최신글추출에서 막혀있네요...
메뉴얼에 있는그대로 했는데 전혀 보이지가 않고 에러만 뜹니다.
제가 한걸말씀드리자면
그루보드의 경로는 index.php가 있는 메인(/public_html)에서 (/public_html/php/gnu)에 만들었습니다.
------------------
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php"); // latest() 함수를 사용하여야 하므로 이 프로그램을 포함시킵니다.
echo latest("basic", "news", 5, 70);
?>
--------------
이렇게 test.php를 index.php가 있는 /public_html에 저장해서
웹에서 test.php를 불러들였더니
-----------------------------
Warning: main(./_common.php): failed to open stream: No such file or directory in /home1/japlatec/public_html/test.php on line 2
Warning: main(): Failed opening './_common.php' for inclusion (include_path='.:/usr/local/php/lib/php') in /home1/japlatec/public_html/test.php on line 2
Warning: main(): open_basedir restriction in effect. File(/lib/latest.lib.php) is not within the allowed path(s): (/tmp/:/home1/japlatec/) in /home1/japlatec/public_html/test.php on line 3
Warning: main(/lib/latest.lib.php): failed to open stream: Operation not permitted in /home1/japlatec/public_html/test.php on line 3
Warning: main(): Failed opening '/lib/latest.lib.php' for inclusion (include_path='.:/usr/local/php/lib/php') in /home1/japlatec/public_html/test.php on line 3
Fatal error: Call to undefined function: latest() in /home1/japlatec/public_html/test.php on line 5
-------------------
이런 오류가뜹니다.
경로문제인가해서 각각에 http://...... 경로를 직접경로로 넣어줘도 같은 오류가뜨네요.
여러가지를 수정해봐도 되지않는걸보니 뭔가 기초적인부분을 놓친것같은데 도무지 찾아지지가 않습니다.
작은도움이라도 부탁드리겠습니다.
이번에 처음 그루보드를 사용하면서 최신글추출에서 막혀있네요...
메뉴얼에 있는그대로 했는데 전혀 보이지가 않고 에러만 뜹니다.
제가 한걸말씀드리자면
그루보드의 경로는 index.php가 있는 메인(/public_html)에서 (/public_html/php/gnu)에 만들었습니다.
------------------
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php"); // latest() 함수를 사용하여야 하므로 이 프로그램을 포함시킵니다.
echo latest("basic", "news", 5, 70);
?>
--------------
이렇게 test.php를 index.php가 있는 /public_html에 저장해서
웹에서 test.php를 불러들였더니
-----------------------------
Warning: main(./_common.php): failed to open stream: No such file or directory in /home1/japlatec/public_html/test.php on line 2
Warning: main(): Failed opening './_common.php' for inclusion (include_path='.:/usr/local/php/lib/php') in /home1/japlatec/public_html/test.php on line 2
Warning: main(): open_basedir restriction in effect. File(/lib/latest.lib.php) is not within the allowed path(s): (/tmp/:/home1/japlatec/) in /home1/japlatec/public_html/test.php on line 3
Warning: main(/lib/latest.lib.php): failed to open stream: Operation not permitted in /home1/japlatec/public_html/test.php on line 3
Warning: main(): Failed opening '/lib/latest.lib.php' for inclusion (include_path='.:/usr/local/php/lib/php') in /home1/japlatec/public_html/test.php on line 3
Fatal error: Call to undefined function: latest() in /home1/japlatec/public_html/test.php on line 5
-------------------
이런 오류가뜹니다.
경로문제인가해서 각각에 http://...... 경로를 직접경로로 넣어줘도 같은 오류가뜨네요.
여러가지를 수정해봐도 되지않는걸보니 뭔가 기초적인부분을 놓친것같은데 도무지 찾아지지가 않습니다.
작은도움이라도 부탁드리겠습니다.
댓글 전체
<?
$g4_path = 'php/gnu';
include_once $g4_path.'/common.php';
include_once $g4['path'].'/lib/latest.lib.php';
echo latest('basic', 'news', 5, 70);
?>
------------------
$g4_path에 상대 경로를 지정 해주는게 핵심
$g4_path = 'php/gnu';
include_once $g4_path.'/common.php';
include_once $g4['path'].'/lib/latest.lib.php';
echo latest('basic', 'news', 5, 70);
?>
------------------
$g4_path에 상대 경로를 지정 해주는게 핵심
감사합니다.. 기본을 몰랐군요^^
근데 다시작성하니 하나의문제가 생기더군요.
1 <?
2 g4_path = 'php/gnu';
3 include_once $g4_path.'/_common.php';
4 include_once $g4_path.'/lib/latest.lib.php'; // latest() 함수를 사용하여야 하므로 이 프로그램을 포함시킵니다.
5
6 echo latest('basic', 'news', 5, 70); // basic 스킨으로 free 라는 게시판을 출력합니다.
7 ?>
이렇게 하니
Parse error: parse error, unexpected '=' in /home1/japlatec/public_html/test.php on line 2
이문제가 뜨네요 ㅠ.ㅠ
근데 다시작성하니 하나의문제가 생기더군요.
1 <?
2 g4_path = 'php/gnu';
3 include_once $g4_path.'/_common.php';
4 include_once $g4_path.'/lib/latest.lib.php'; // latest() 함수를 사용하여야 하므로 이 프로그램을 포함시킵니다.
5
6 echo latest('basic', 'news', 5, 70); // basic 스킨으로 free 라는 게시판을 출력합니다.
7 ?>
이렇게 하니
Parse error: parse error, unexpected '=' in /home1/japlatec/public_html/test.php on line 2
이문제가 뜨네요 ㅠ.ㅠ
g4_path = 'php/gnu';
변수 앞에는 항상 $가 있어야 합니다
$g4_path = 'php/gnu';
---------------------------------------
include_once $g4_path.'/_common.php';
_common.php가 아니라 common.php이어야 합니다.
include_once $g4_path.'/common.php';
------------------------------------------
include_once $g4_path.'/lib/latest.lib.php';
common.php와는 다르게 $g4_path가 아닌 $g4['path']입니다.
include_once $g4['path'].'/lib/latest.lib.php';
--------------------------------------------
echo latest('basic', 'free', 5, 70);
free게시판 출력
변수 앞에는 항상 $가 있어야 합니다
$g4_path = 'php/gnu';
---------------------------------------
include_once $g4_path.'/_common.php';
_common.php가 아니라 common.php이어야 합니다.
include_once $g4_path.'/common.php';
------------------------------------------
include_once $g4_path.'/lib/latest.lib.php';
common.php와는 다르게 $g4_path가 아닌 $g4['path']입니다.
include_once $g4['path'].'/lib/latest.lib.php';
--------------------------------------------
echo latest('basic', 'free', 5, 70);
free게시판 출력
common.php에서는 $g4_path이고.. latest.lib.php에서는 $g4['path']인 이유는
common.php에서 $g4_path경로를 $g4['path']에 담고 $g4_path변수는 삭제 하기 때문
common.php에서 $g4_path경로를 $g4['path']에 담고 $g4_path변수는 삭제 하기 때문
감사합니다. 잘되네요.
혼자서 머리터지는줄알았는데 끝님 감사합니다.^^
혼자서 머리터지는줄알았는데 끝님 감사합니다.^^