오류가 안뜨는 대신 화면이 빈페이지로 뜨는 이유는 무엇인지요???
그리고,,
토시 하나 안틀리고 따라하는데도 안되는 이유를 모르겠어서,, _common.php를 gnuboard4상위 폴더, index.html파일과 함께도 해봤다가 이것저것 해봤는데요,, 결론은 아직도 성공하지 못하고 있어요..-_ㅠ
또 궁금한 것은 오류는 안뜨는데,, 가끔 body중간에 넣은 코드 <?=outlogin("basic");?> 이하 부분은 아에 출력이 되지 않을 때도 있어요,, 왜그런거죠??
그리고 다시 한번 제가 틀렸는지 좀 봐주세요.
www파일에 index.html과 gnuboard4폴더가 있습니다.
_common.php 파일은
<?
$g4_path = "./gnuboard4"; // common.php 의 상대 경로
include_once("$g4_path/common.php");
?>
이렇게 고쳤구요.
_common.php 요놈을 www폴더에 위치시키고
index.html 코드 맨위에
<?
include_once("./_common.php");
include_once("$g4[path]/lib/outlogin.lib.php");
?>
를 넣으면 홈페이지가 아에 빈화면으로 출력이 됩니다.
그리고
_common.php 파일을 gnuboard4폴더에 위치 시키고,
index.html 코드 맨위에
<?
include_once("./gnuboard4/_common.php");
include_once("$g4[path]/lib/outlogin.lib.php");
?>
를 넣어도 역시나 홈페이지가 아에 빈화면으로 출력 됩니다.
제발 도와주세요..부탁드려요.ㅠㅠ
그리고,,
토시 하나 안틀리고 따라하는데도 안되는 이유를 모르겠어서,, _common.php를 gnuboard4상위 폴더, index.html파일과 함께도 해봤다가 이것저것 해봤는데요,, 결론은 아직도 성공하지 못하고 있어요..-_ㅠ
또 궁금한 것은 오류는 안뜨는데,, 가끔 body중간에 넣은 코드 <?=outlogin("basic");?> 이하 부분은 아에 출력이 되지 않을 때도 있어요,, 왜그런거죠??
그리고 다시 한번 제가 틀렸는지 좀 봐주세요.
www파일에 index.html과 gnuboard4폴더가 있습니다.
_common.php 파일은
<?
$g4_path = "./gnuboard4"; // common.php 의 상대 경로
include_once("$g4_path/common.php");
?>
이렇게 고쳤구요.
_common.php 요놈을 www폴더에 위치시키고
index.html 코드 맨위에
<?
include_once("./_common.php");
include_once("$g4[path]/lib/outlogin.lib.php");
?>
를 넣으면 홈페이지가 아에 빈화면으로 출력이 됩니다.
그리고
_common.php 파일을 gnuboard4폴더에 위치 시키고,
index.html 코드 맨위에
<?
include_once("./gnuboard4/_common.php");
include_once("$g4[path]/lib/outlogin.lib.php");
?>
를 넣어도 역시나 홈페이지가 아에 빈화면으로 출력 됩니다.
제발 도와주세요..부탁드려요.ㅠㅠ
댓글을 작성하시려면 로그인이 필요합니다.
댓글 5개
루트 폴더 index. 관련 파일 모두 삭제
루트 폴더에 index.php 파일 작성 아래 내용 복사 붙여넣기 후 확인
[서버설정이 php코드 사용 가능 상태라면 확장자 html도 무관하나 굳이 html로 할 필요 없음]
<? // 복사 시작
$g4_path = "./gnuboard4"; // common.php 의 상대 경로 ★★
include_once("$g4_path/common.php"); // ★★
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/latest.lib.php");
include_once("$g4[path]/lib/outlogin.lib.php"); // 다른 폴더 index 아웃로그인 처리위한
$g4['title'] = "";
#include_once("$g4[path]/_head.php"); // ★ ./ 를 $g4[path]로
?>
<!-- 메인화면 최신글 시작 -->
<table width="100%" cellpadding=0 cellspacing=0><tr><td valign=top>
<?
echo outlogin("basic");
?>
</td></tr></table>
<!-- 메인화면 최신글 끝 -->
<?
#include_once("$g4[path]/_tail.php"); // ★ ./ 를 $g4[path]로
// 복사 마지막 ?>
결과 왼편 상단에 로그인만 출력됨
[html 파일에 php코드 반영 가능으로 서버상에서 설정 되어 있느냐의 차이]
index.html 을 index.php 로 변경 후 확인 해 보시고
미해결시 추가했다는 소스 포함 index 전체 내용으로 추가 질문 남겨 보세요.
올려주신 외부로그인 코드만으로 php, html 파일을 구성해서 서버에 올리면 잘 됩니다.
하지만 기존것과 올려주신 코드 합치면 빈화면입니다. 기존 것은 메인메뉴에 서브메뉴용 비헤이비어정도만 적용하였습니다. 현재 드림위버로 만들고 있고, 게시판은 되는지 확인 했고, 로그인 까지 완료 된후, 디자인 적용 할 계획입니다.
------------------------------------
<? // 복사 시작
$g4_path = "./gnuboard4"; // common.php 의 상대 경로 ★★
include_once("$g4_path/common.php"); // ★★
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/latest.lib.php");
include_once("$g4[path]/lib/outlogin.lib.php"); // 다른 폴더 index 아웃로그인 처리위한
$g4['title'] = "";
#include_once("$g4[path]/_head.php"); // ★ ./ 를 $g4[path]로
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>****English for Better Tommorow****</title>
<style type="text/css">
<!--
body,td {
font-family: 맑은고딕,돋움;
font-size: 10pt;
color: #333333;
line-height:150%;
}
#apDiv1 {
position:absolute;
left:380px;
top:140px;
width:229px;
height:37px;
z-index:1;
visibility: hidden;
}
#apDiv2 {
position:absolute;
left:563px;
top:140px;
width:224px;
height:38px;
z-index:2;
visibility: hidden;
}
#apDiv3 {
position:absolute;
left:609px;
top:140px;
width:235px;
height:36px;
z-index:3;
visibility: hidden;
}
#apDiv4 {
position:absolute;
left:779px;
top:140px;
width:223px;
height:38px;
z-index:4;
visibility: hidden;
}
a:link {
text-decoration: none;
color: #000;
}
a:visited {
text-decoration: none;
color: #000;
}
a:hover {
text-decoration: none;
color: #000;
}
a:active {
text-decoration: none;
color: #000;
}
</style>
<script type="text/javascript">
function MM_showHideLayers() { //v9.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3)
with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
</script>
</head>
<body onLoad="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')">
<div id="apDiv1">
<img src="images/sub-menu1.jpg" border="0" usemap="#Map" onMouseOver="MM_showHideLayers('apDiv1','','show','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')" onMouseOut="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')" />
<map name="Map" id="Map">
<area shape="rect" coords="10,5,90,28" href="#" onClick="MM_goToURL('parent','ourgoal.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv1','','show','Map','','show')" />
<area shape="rect" coords="103,8,171,29" href="#" onClick="MM_goToURL('parent','setup.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv1','','show','Map','','show')" />
<area shape="rect" coords="187,5,278,29" href="#" onClick="MM_goToURL('parent','direction.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv1','','show','Map','','show')" />
</map>
</div>
<div id="apDiv2"><img src="images/sub-menu2.jpg" border="0" usemap="#Map2" onMouseOver="MM_showHideLayers('apDiv1','','hide','apDiv2','','show','apDiv3','','hide','apDiv4','','hide')" onMouseOut="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')" />
<map name="Map2" id="Map2">
<area shape="rect" coords="7,5,102,24" href="#" onClick="MM_goToURL('parent','curriculum.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv2','','show','Map2','','show')" />
<area shape="rect" coords="118,6,209,26" href="#" onClick="MM_goToURL('parent','timetable.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv2','','show','Map2','','show')" />
</map>
</div>
<div id="apDiv3"><img src="images/sub-menu3.jpg" border="0" usemap="#Map3" onMouseOver="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','show','apDiv4','','hide')" onMouseOut="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')" />
<map name="Map3" id="Map3">
<area shape="rect" coords="10,6,112,28" href="#" onClick="MM_goToURL('parent','assignment.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv3','','show','Map3','','show')" />
<area shape="rect" coords="129,7,216,27" href="#" onClick="MM_goToURL('parent','checkup.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv3','','show','Map3','','show')" />
<area shape="rect" coords="233,8,317,27" href="#" onClick="MM_goToURL('parent','materials.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv3','','show','Map3','','show')" />
</map>
</div>
<div id="apDiv4"><img src="images/sub-menu4.jpg" border="0" usemap="#Map4" onClick="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')" onMouseOver="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','show')" />
<map name="Map4" id="Map4">
<area shape="rect" coords="12,4,86,29" href="#" onClick="MM_goToURL('parent','bulletin.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv4','','show','Map4','','show')" />
<area shape="rect" coords="97,7,162,36" href="#" onClick="MM_goToURL('parent','qna.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv4','','show','Map4','','show')" />
<area shape="rect" coords="174,8,253,29" href="#" onClick="MM_goToURL('parent','parents.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv4','','show','Map4','','show')" />
</map>
</div>
<map name="menucom" id="menucom">
<area shape="rect" coords="449,9,559,91" href="#" onClick="MM_goToURL('parent','ourgoal.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv1','','show','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')" onMouseOut="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')" />
<area shape="rect" coords="589,9,694,95" href="#" onClick="MM_goToURL('parent','curriculum.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv1','','hide','apDiv2','','show','apDiv3','','hide','apDiv4','','hide')" onMouseOut="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')" />
<area shape="rect" coords="723,12,812,95" href="#" onClick="MM_goToURL('parent','assignment.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','show','apDiv4','','hide')" onMouseOut="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')" />
<area shape="rect" coords="844,15,969,93" href="#" onClick="MM_goToURL('parent','bulletin.html');return document.MM_returnValue" onMouseOver="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','show')" onMouseOut="MM_showHideLayers('apDiv1','','hide','apDiv2','','hide','apDiv3','','hide','apDiv4','','hide')" />
<area shape="rect" coords="13,3,220,86" href="#" onClick="MM_goToURL('parent','index.html');return document.MM_returnValue" />
</map>
<table width="1050" border="0" align="left">
<tr>
<td width="1050" height="40" align="right"><a href="index.html">HOME</a> | <a href="login.html">LOG IN</a> | <a href="registration.html">REGISTRATION</a> |<a href="bulletin.html"> COMMUNITY</a> | <a href="sitemap.html">SITEMAP</a> </td>
</tr>
<tr>
<td ><img src="images/topmenu.jpg" width="1050" height="100" border="0" usemap="#menucom" ></td>
</tr>
<tr>
<td width="1050" height="20" align="right">
</td> </tr>
</table>
<!-- 메인화면 최신글 시작 -->
<table width="100%" cellpadding=0 cellspacing=0><tr><td valign=top>
<?
echo outlogin("basic");
?>
</td></tr></table>
<!-- 메인화면 최신글 끝 -->
</body>
</html><?
include_once("$g4[path]/_tail.php"); // ★ ./ 를 $g4[path]로
// 복사 마지막 ?>
-->
</style>
--> 이거 빠져있음
위 내용 처리 후라도 로그인이 우측에 배치되어 안보일 것으로 예상
<table width="1050" border="0" align="left">
align="left" 삭제 후 확인 또는 테이블 아래 로그인 부분 수정 등 추가 변경 필요