'상단 내용' 에 php구문을 쓰니 먹히질 않네요. 정보
'상단 내용' 에 php구문을 쓰니 먹히질 않네요.관련링크
본문
게시판 수정 페이지의
상단 내용 항목에 php구문을 썻느데 먹히지 않는군요.
include 구문을 썻는데 상대경로로해서 되질 않아 절대경로로 했는데도 먹히질 않습니다.
<? include "/banner.html"; ?> 이러한 PHP구문은 상단 내용이란 항목내에서는 작동하지 않나요?
아니면 무슨 방법이 잇는지?...
소스보기를 통해 문제의 게시판 소스를 봤는데 <? include "/banner.html"; ?> 가 아에 그대로 나오더군요... 흠 어떻게 해야 하는지 모르겠습니다. ㅜㅜ
게시판 상단 내용에 입력한 내용
<!--메인메뉴시작-->
<td height="44"><a href="javascript:page_go(10);" onMouseOver='cnj("menu1","/nmcl2/images/menu_1on.jpg")' onMouseOut='cnj("menu1","/nmcl2/images/menu_1.jpg")'><img src="/nmcl2/images/menu_1.jpg" width="107" height="44" alt="" name="menu1" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(20);" onMouseOver='cnj("menu2","/nmcl2/images/menu_2on.jpg")' onMouseOut='cnj("menu2","/nmcl2/images/menu_2.jpg")'><img src="/nmcl2/images/menu_2.jpg" width="110" height="44" alt="" name="menu2" style="filter:blendTrans(duration=0.2)" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(30);" onMouseOver='cnj("menu3","/nmcl2/images/menu_3on.jpg")' onMouseOut='cnj("menu3","/nmcl2/images/menu_3.jpg")'><img src="/nmcl2/images/menu_3.jpg" width="119" height="44" alt="" name="menu3" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(40);" onMouseOver='cnj("menu4","/nmcl2/images/menu_4on.jpg")' onMouseOut='cnj("menu4","/nmcl2/images/menu_4.jpg")'><img src="/nmcl2/images/menu_4.jpg" width="110" height="44" alt="" name="menu4" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(50);" onMouseOver='cnj("menu5","/nmcl2/images/menu_5on.jpg")' onMouseOut='cnj("menu5","/nmcl2/images/menu_5.jpg")'><img src="/nmcl2/images/menu_5.jpg" width="110" height="44" alt="" name="menu5" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(60);" ><img src="/nmcl2/images/menu_6on.jpg" width="110" height="44" alt="" name="menu6" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(10);" onMouseOver='cnj("menu1","/nmcl2/images/menu_1on.jpg")' onMouseOut='cnj("menu1","/nmcl2/images/menu_1.jpg")'><img src="/nmcl2/images/menu_1.jpg" width="107" height="44" alt="" name="menu1" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(20);" onMouseOver='cnj("menu2","/nmcl2/images/menu_2on.jpg")' onMouseOut='cnj("menu2","/nmcl2/images/menu_2.jpg")'><img src="/nmcl2/images/menu_2.jpg" width="110" height="44" alt="" name="menu2" style="filter:blendTrans(duration=0.2)" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(30);" onMouseOver='cnj("menu3","/nmcl2/images/menu_3on.jpg")' onMouseOut='cnj("menu3","/nmcl2/images/menu_3.jpg")'><img src="/nmcl2/images/menu_3.jpg" width="119" height="44" alt="" name="menu3" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(40);" onMouseOver='cnj("menu4","/nmcl2/images/menu_4on.jpg")' onMouseOut='cnj("menu4","/nmcl2/images/menu_4.jpg")'><img src="/nmcl2/images/menu_4.jpg" width="110" height="44" alt="" name="menu4" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(50);" onMouseOver='cnj("menu5","/nmcl2/images/menu_5on.jpg")' onMouseOut='cnj("menu5","/nmcl2/images/menu_5.jpg")'><img src="/nmcl2/images/menu_5.jpg" width="110" height="44" alt="" name="menu5" style="filter:blendTrans(duration=0.2)" ></a></td>
<td height="44"><a href="javascript:page_go(60);" ><img src="/nmcl2/images/menu_6on.jpg" width="110" height="44" alt="" name="menu6" style="filter:blendTrans(duration=0.2)" ></a></td>
</tr>
</table>
</td>
<td width="100%" height="74" style="background-image:url('/nmcl2/images/menu_bg.jpg'); background-repeat:repeat-x; background-position:0% 29;"></td>
</tr>
<tr>
<td valign="top">
<!--- 메인메뉴끝-->
<!-- sub menu 시작 -->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4"><img src="/nmcl2/images/menu_bg4.jpg" width="243" height="48" alt=""></td>
</tr>
<tr>
<td rowspan="4" width="25"></td>
<td colspan="3"><img src="/nmcl2/images/menu_title6.jpg" width="219" height="59" alt=""></td>
</tr>
<tr>
<td rowspan="3" width="26"></td>
<td><a href="javascript:page_go(60);" onMouseOver='cnj("id01","/nmcl2/images/sub_61on.jpg")' onMouseOut='cnj("id01","/nmcl2/images/sub_61.jpg")'><img src="/nmcl2/images/sub_61.jpg" width="167" height="27" alt="" name="id01" style="filter:blendTrans(duration=0.4)"></a></td>
<td rowspan="3" width="26"></td>
</tr>
<tr>
<td><a href="javascript:page_go(61);"><img src="/nmcl2/images/sub_62on.jpg" width="167" height="27" alt="" name="id02" style="filter:blendTrans(duration=0.4)"></a></td>
</tr>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4"><img src="/nmcl2/images/menu_bg4.jpg" width="243" height="48" alt=""></td>
</tr>
<tr>
<td rowspan="4" width="25"></td>
<td colspan="3"><img src="/nmcl2/images/menu_title6.jpg" width="219" height="59" alt=""></td>
</tr>
<tr>
<td rowspan="3" width="26"></td>
<td><a href="javascript:page_go(60);" onMouseOver='cnj("id01","/nmcl2/images/sub_61on.jpg")' onMouseOut='cnj("id01","/nmcl2/images/sub_61.jpg")'><img src="/nmcl2/images/sub_61.jpg" width="167" height="27" alt="" name="id01" style="filter:blendTrans(duration=0.4)"></a></td>
<td rowspan="3" width="26"></td>
</tr>
<tr>
<td><a href="javascript:page_go(61);"><img src="/nmcl2/images/sub_62on.jpg" width="167" height="27" alt="" name="id02" style="filter:blendTrans(duration=0.4)"></a></td>
</tr>
<tr>
<td height="9"><a href="javascript:page_go(62);" onMouseOver='cnj("id03","/nmcl2/images/sub_63on.jpg")' onMouseOut='cnj("id03","/nmcl2/images/sub_63.jpg")'><img src="/nmcl2/images/sub_63.jpg" width="167" height="27" alt="" name="id03" style="filter:blendTrans(duration=0.4)"></a></td>
</tr>
</table>
<td height="9"><a href="javascript:page_go(62);" onMouseOver='cnj("id03","/nmcl2/images/sub_63on.jpg")' onMouseOut='cnj("id03","/nmcl2/images/sub_63.jpg")'><img src="/nmcl2/images/sub_63.jpg" width="167" height="27" alt="" name="id03" style="filter:blendTrans(duration=0.4)"></a></td>
</tr>
</table>
<? include "../../nmcl2/banner.html"; ?>
</td>
<td>
<!-- page title -->
<img src="/nmcl2/images/title_62.jpg" alt=""><br><span class=status> HOME > COMMUNITY > <font color="#808080">FREEBOARD</font></span>
<table border="0" width="666" cellspacing="0" cellpadding="0">
<tr>
<td>
<br>
<!-- main data 시작 -->
<img src="/nmcl2/images/title_62.jpg" alt=""><br><span class=status> HOME > COMMUNITY > <font color="#808080">FREEBOARD</font></span>
<table border="0" width="666" cellspacing="0" cellpadding="0">
<tr>
<td>
<br>
<!-- main data 시작 -->
댓글 전체
그 방법을 해봤는데 오히려 테이블이 깨지고 역시나 include가 작동하지 않네요. 다른 php구문도 안되는거 같네요..
bbs/board_head.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 게시판 관리의 상단 파일 경로
if ($board[bo_include_head])
@include ($board[bo_include_head]);
// 게시판 관리의 상단 이미지 경로
if ($board[bo_image_head])
echo "<img src='$g4[path]/data/file/$bo_table/$board[bo_image_head]' border='0'>";
// 게시판 관리의 상단 내용 <-- 이 아래 부분이 해당됨
if ($board[bo_content_head])
if($bo_table=="nmclfreeboard") { // 이부분을 원하시는 대로 적절히 가공을 하시면 됩니다.)
@include ($board[bo_content_head]);
} else {
echo stripslashes($board[bo_content_head]);
}
?>
상단내용...
<? include "../../nmcl2/banner.html"; ?>
-->../../nmcl2/banner.html
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 게시판 관리의 상단 파일 경로
if ($board[bo_include_head])
@include ($board[bo_include_head]);
// 게시판 관리의 상단 이미지 경로
if ($board[bo_image_head])
echo "<img src='$g4[path]/data/file/$bo_table/$board[bo_image_head]' border='0'>";
// 게시판 관리의 상단 내용 <-- 이 아래 부분이 해당됨
if ($board[bo_content_head])
if($bo_table=="nmclfreeboard") { // 이부분을 원하시는 대로 적절히 가공을 하시면 됩니다.)
@include ($board[bo_content_head]);
} else {
echo stripslashes($board[bo_content_head]);
}
?>
상단내용...
<? include "../../nmcl2/banner.html"; ?>
-->../../nmcl2/banner.html
저같은 경우엔 include로 하다가
<? include_once("$g4[path]/link.php"); ?> 이런식으로 하니 그냥 되더군요.-_-;;
그리고 주소는 막연한 주소법보다 위에 것처럼 하시는게 더 좋을 것 같아요. 서로 꼬이는 일이 생길 수도 있거든요.
<? include_once("$g4[path]/link.php"); ?> 이런식으로 하니 그냥 되더군요.-_-;;
그리고 주소는 막연한 주소법보다 위에 것처럼 하시는게 더 좋을 것 같아요. 서로 꼬이는 일이 생길 수도 있거든요.
저 같은 경우는 보드마다 파일 인클루드안하고
bbs/board_head.php
bbs/board_tail.php
에 각각
include_once("$g4[path]/head.php");
include_once("$g4[path]/tail.php");
이렇게 삽입하고
헤드와 테일 에서 각페이지별 게시판별 다른 헤드와 테일 파일 불러오게 하면 메인 한장과 서브 한장으로 홈전체 디자인이 완성되죠
플래시 넣을경우는 각페이지별 특정코드번호 입력받아서 각각 페이지 다른 화면 출력 설정하시고..
bbs/board_head.php
bbs/board_tail.php
에 각각
include_once("$g4[path]/head.php");
include_once("$g4[path]/tail.php");
이렇게 삽입하고
헤드와 테일 에서 각페이지별 게시판별 다른 헤드와 테일 파일 불러오게 하면 메인 한장과 서브 한장으로 홈전체 디자인이 완성되죠
플래시 넣을경우는 각페이지별 특정코드번호 입력받아서 각각 페이지 다른 화면 출력 설정하시고..