최신글 추출 하기 질문입니다!! 정보
최신글 추출 하기 질문입니다!!본문
팁을 검색해봤는데도 경로가 바뀌니까 응용을 못하겠더군요.
www
|------gnuboard4
|
|------dp----index.htm
----_common.php
이렇게 구성되어 있는데요..
index.htm에 이런 내용을...
<?
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "제목";
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/latest.lib.php");
?>
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "제목";
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/latest.lib.php");
?>
<?=latest("basic", "news", 1, 20);?>
<?
include_once("$g4[path]/tail.sub.php");
?>
include_once("$g4[path]/tail.sub.php");
?>
_common.php에 이런 내용을...
<?
$g4_path = "..";
include_once("$g4_path/common.php");
?>
$g4_path = "..";
include_once("$g4_path/common.php");
?>
입력했는데 에러메세지들이 뜨더군요. 어떤 부분을 어떻게 건드려야 하나요?
에러메세지는 다음과 같습니다.
Warning: main(./common.php): failed to open stream: No such file or directory in /home/hosting_users/ncore/www/dp/_common.php on line 3
Warning: main(): Failed opening './common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/ncore/www/dp/_common.php on line 3
Warning: main(/head.sub.php): failed to open stream: No such file or directory in /home/hosting_users/ncore/www/dp/index.htm on line 11
Warning: main(): Failed opening '/head.sub.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/ncore/www/dp/index.htm on line 11
Warning: main(/lib/latest.lib.php): failed to open stream: No such file or directory in /home/hosting_users/ncore/www/dp/index.htm on line 12
Warning: main(): Failed opening '/lib/latest.lib.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/ncore/www/dp/index.htm on line 12
Warning: main(): Failed opening './common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/ncore/www/dp/_common.php on line 3
Warning: main(/head.sub.php): failed to open stream: No such file or directory in /home/hosting_users/ncore/www/dp/index.htm on line 11
Warning: main(): Failed opening '/head.sub.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/ncore/www/dp/index.htm on line 11
Warning: main(/lib/latest.lib.php): failed to open stream: No such file or directory in /home/hosting_users/ncore/www/dp/index.htm on line 12
Warning: main(): Failed opening '/lib/latest.lib.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/ncore/www/dp/index.htm on line 12
Fatal error: Call to undefined function: latest() in /home/hosting_users/ncore/www/dp/index.htm on line 30
댓글 전체

_common.php 파일에는 다음과 같이...
<?
$g4_path = "../gnuboard4";
include_once("$g4_path/common.php");
?>
<?
$g4_path = "../gnuboard4";
include_once("$g4_path/common.php");
?>

.. 상위로 한번 올라가서~
gnuboard4 폴더에~
common.php 파일을 불러와라~
gnuboard4 폴더에~
common.php 파일을 불러와라~
아 감사합니다. 유아원님 그런데
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 32
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 34
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 35
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 36
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 37
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 38
이러한 에러메세지가 왜 뜨는것이죠.
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 32
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 34
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 35
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 36
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 37
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/ncore/www/dp/index.htm:7) in /home/hosting_users/ncore/www/gnuboard4/head.sub.php on line 38
이러한 에러메세지가 왜 뜨는것이죠.
아 해결했네요.
php코드를 최상단에다가 입력했는데 해결이 되는군요.
php코드를 최상단에다가 입력했는데 해결이 되는군요.