게시판 글에서 일반 html 문서를 링크하는 법? 정보
게시판 글에서 일반 html 문서를 링크하는 법?본문
아래 그림과 같이 게시판 글에서 다른 html 문서를 불러와
게시판 글 자리에 나타나게 하고 싶습니다.
<A HREF= 태그를 사용하니 head와 tail 부분이 없어지고 html 문서만
출력되더군요. target=_self를 사용해도 마찬가지이구요.
어떤 방법을 사용해야 원하는 바를 이룰 수 있는지요.
초보자라 도움말을 얻고자 합니다.

댓글 전체
<?
include_once("./_common.php"); //경로는 맞춰주셔야 합니다.
$g4[title] = "타이틀";
include_once("./_head.php");
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" valign="top">
일반페이지 내용들..
</td>
</tr>
</table>
<?
include_once("./_tail.php");
?>
일반 페이지를 이런식으로 작성하시면 됩니다..^^
include_once("./_common.php"); //경로는 맞춰주셔야 합니다.
$g4[title] = "타이틀";
include_once("./_head.php");
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" valign="top">
일반페이지 내용들..
</td>
</tr>
</table>
<?
include_once("./_tail.php");
?>
일반 페이지를 이런식으로 작성하시면 됩니다..^^
PhotoFly님 말씀처럼 제작한 내용을 원하는 파일 예를들어 aaa.html로 저장하시고요.
링크의 경우 aaa.html로 링크하고, target은 _self로 지정하시면 되겠네요.
링크의 경우 aaa.html로 링크하고, target은 _self로 지정하시면 되겠네요.
도움말 감사합니다.
그런데 include_once("../_common.php"); include_once("./_head.php"); 라인의 경로를 바꾸어 봐도 자꾸 다음과 같은 에러가 생기는군요.
Warning: include_once(../_common.php) [function.include-once]: failed to open stream: No such file or directory in /home/dohan/public_html/bbs/doc/Matsuo/what_tps.php on line 2
Warning: include_once() [function.include]: Failed opening '../_common.php' for inclusion (include_path='.:/usr/local/php_5.2.0/lib/php') in /home/dohan/public_html/bbs/doc/Matsuo/what_tps.php on line 2
_common.php와 _head.php, 그리고 tail.php 파일은 bbs 디렉토리의 파일을 가리키는 것이겠지요?
경로로 변경해도 문제가 없어지지 않아 경로 변경에 의한 문제 해결은 포기하고,
아예 html 문서를 bbs 디렉토리에 이동해두고 실행하니 일단 원하는대로 실행은 되는군요.
감사합니다.
그런데 include_once("../_common.php"); include_once("./_head.php"); 라인의 경로를 바꾸어 봐도 자꾸 다음과 같은 에러가 생기는군요.
Warning: include_once(../_common.php) [function.include-once]: failed to open stream: No such file or directory in /home/dohan/public_html/bbs/doc/Matsuo/what_tps.php on line 2
Warning: include_once() [function.include]: Failed opening '../_common.php' for inclusion (include_path='.:/usr/local/php_5.2.0/lib/php') in /home/dohan/public_html/bbs/doc/Matsuo/what_tps.php on line 2
_common.php와 _head.php, 그리고 tail.php 파일은 bbs 디렉토리의 파일을 가리키는 것이겠지요?
경로로 변경해도 문제가 없어지지 않아 경로 변경에 의한 문제 해결은 포기하고,
아예 html 문서를 bbs 디렉토리에 이동해두고 실행하니 일단 원하는대로 실행은 되는군요.
감사합니다.
<?
include_once("../common.php"); //경로는 맞춰주셔야 합니다.
$g4[title] = "타이틀";
include_once("$g4[path]/head.php");
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" valign="top">
일반페이지 내용들..
</td>
</tr>
</table>
<?
include_once("$g4[path]/tail.php");
?>
이렇게 해보세요...^^
include_once("../common.php"); //경로는 맞춰주셔야 합니다.
$g4[title] = "타이틀";
include_once("$g4[path]/head.php");
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" valign="top">
일반페이지 내용들..
</td>
</tr>
</table>
<?
include_once("$g4[path]/tail.php");
?>
이렇게 해보세요...^^