묻고답하기

http://gatta11.idomz.net/blogger/blogger.html 들어가보시면 코멘트 등록하는게 있습니다..("0 comment" 부분)
여기서 코멘트를 쓰고 submit 버튼을 누르면

Warning: fwrite(): supplied argument is not a valid stream resource in /home/gatta11/weblog/comments.php on line 39

Warning: fclose(): supplied argument is not a valid stream resource in /home/gatta11/weblog/comments.php on line 40

Warning: Cannot modify header information - headers already sent by (output started at /home/gatta11/weblog/comments.php:39) in /home/gatta11/weblog/comments.php on line 43

이렇게 나옵니다..ㅠ_ㅠ
어렵게 어렵게 코멘트를 설치했는데 여기부터 막히네요...
html은 좀 안다 치더라도 php은 정말 문외한이라..ㅠㅠ
어디가 잘못됬는지줌 알려주세요~ 부탁드립니다~ ㅠㅠ



(여기부턴 코딩입니다)

<?
// User-defined Variables (FEEL FREE TO EDIT THESE)
$head_title = "mydomain.com | dotcomments";
$body_alink = "#0C729D";
$body_bgcolor = "#FFFFFF";
$body_link = "#0C729D";
$body_text = "#000000";
$body_vlink = "#0C729D";
$table_bgcolor = array("#E2F5B1", "#FFFFFF");
$font_altcolor = "#9E9E9E";
$font_face = "verdana, arial, geneva, sans-serif";
$font_size = "12px";
$form_bgcolor = "#BCDC67";
$form_text = "#2A2E2A";
$order = "1";
$timeAdjustment = "0";
$comments_path = "http://gatta11.idomz.net/weblog/";
$email = "gatta11@dreamwiz.com";
$showip = "0";

// Begin Comment Parsing (DON'T EDIT THIS)
error_reporting(7);

$commentID = ereg_replace('[^0-9]', '', getenv('QUERY_STRING'));
$commentText = preg_replace('/<((?!/?(b|i|u|a|ol|ul|li)b)[^>]*)>/xis', '', ' ' . stripslashes(trim($commentText)));
$commentText = trim(eregi_replace("[^"]((http|mailto|ftp)://[^[:space:]<>]{1,})", " <a href="\1">\1</a>", $commentText));
$commentText = str_replace("n", '<br>', $commentText);

if($commentText) {
  if(!isset($commentName) && isset($submit)) $commentName = 'Anonymous'; else $commentName = strip_tags(trim($commentName));
  if(!isset($commentMail)) $commentMail = ''; else $commentMail = strip_tags(trim($commentMail));
  if(!isset($commentSite)) $commentSite = ''; else $commentSite = strip_tags(trim($commentSite));
  if(strlen($commentSite) && !stristr($commentSite, 'http://')) $commentSite = 'http://' . $commentSite;

  $commentDate = time() + ($timeAdjustment * 3600);
  $thisComment = $commentDate . '+ '+ '[+]' . $commentName . '[+]' . $commentMail . '[+]' . $commentText . '[+]' . $commentSite . '[+]' . getenv('REMOTE_ADDR') . "n";

  $file = @fopen("comments/$commentID.comment", '+ 'a');
  fwrite($file, $thisComment);
  fclose($file);

  $cookie = $commentName . '[+]' . $commentMail . '[+]' . $commentSite;
  setcookie('+ 'comments', $cookie, time() + 31536000);

  if($email) {
    mail($email, "New Comment [$commentID]", stripslashes($commentText) . "nn--nTo view this comment, visit " . $comments_path . "comments.php?" . $commentID, "From: $commentName <$commentMail>");
  }
} elseif($HTTP_COOKIE_VARS['comments']){
  list($commentName, $commentMail, $commentSite) = explode('[+]', $HTTP_COOKIE_VARS['comments']);
}

if($file = @fopen($comments_path . "comments/$commentID.comment", 'r')) {
  $comments = fread($file, '+ '1000000');
  $comments = explode("n", trim($comments));
  fclose($file);

  for($i = 0; $i < sizeof($comments); $i++) {
    $thisComment = explode('[+]', stripslashes($comments[$i]));
    $thisComment[0] = ' • ' . date("m/d/y h:ia", $thisComment[0]);
    if($thisComment[2]) $thisComment[2] = ' [<a href="mailto:' . $thisComment[2] . '">' . $thisComment[2] . '</a>] ';
    if($thisComment[4]) $thisComment[1] = '<a href="' . $thisComment[4] . '">' . $thisComment[1] . '</a>';
    if($thisComment[5] && $showip) $thisComment[5] = ' • ' . $thisComment[5]; else $thisComment[5] = '';
    $comment[$i] = $thisComment[3] . "<br>n<div class="date">" . $thisComment[1] . $thisComment[2] . $thisComment[5] . $thisComment[0] . "</div>n";
  }
} else {
  $comment[0] = "No comments found.<br>n";
}

if($order) {
  $countStart = 0;
  $countEnd = sizeof($comment);
  $countInc = 1;
} else {
  $countStart = sizeof($comment) - 1;
  $countEnd = -1;
  $countInc = -1;
}

// End Comment Parsing
?>

<html>
<head>
<title><? echo $head_title; ?></title>

<style type="text/css">
<!--
  a {font-weight:bold; text-decoration:none}
  .comment {font-family:<? echo $font_face; ?>; font-size:<? echo $font_size; ?>}
  .date {color:<? echo $font_altcolor; ?>; font-family:<? echo $font_face; ?>; font-size:<? echo $font_size; ?>; font-weight:bold}
  .form {color:<? echo $form_text; ?>; font-family:<? echo $font_face; ?>; font-size:<?echo $font_size; ?>}
  .input {width:100%}
//-->
</style>

<base target="_blank">
</head>

<body alink="<? echo $body_alink; ?>" bgcolor="<? echo $body_bgcolor; ?>" leftmargin="0" link="<? echo $body_link; ?>" marginheight="0" marginwidth="0" text="<? echo $body_text; ?>" topmargin="0" vlink="<? echo $body_vlink; ?>">
<form method="post" name="frmPost" target="_top">
<table border="0" cellpadding="10" cellspacing="1" width="100%">
<? for($i = $countStart; $i != $countEnd; $i += $countInc) { ?>
<tr>
  <td bgcolor="<? echo $table_bgcolor[$i % 2]; ?>" class="comment">
  <? echo $comment[$i]; ?>
  </td>
</tr>
<? } ?>
<tr>
  <td bgcolor="<? echo $form_bgcolor; ?>">
  <table border="0" cellpadding="4" cellspacing="0" width="100%">
  <tr>
    <td align="left" class="form" colspan="2" valign="middle" width="100%"><b>Add your comment (Thanks! ^^):</b> </td>
  </tr>
  <tr>
    <td align="left" class="form" valign="middle" width="1%">Name:</td>
    <td align="left" valign="middle" width="99%"><input class="input" maxlength="50" name="commentName" size="40" type="text" value="<? echo $commentName; ?>"></td>
  </tr>
  <tr>
    <td align="left" class="form" valign="middle">E-mail:</td>
    <td align="left" valign="middle"><input class="input" maxlength="75" name="commentMail" size="40" type="text" value="<? echo $commentMail; ?>"></td>
  </tr>
  <tr>
    <td align="left" class="form" valign="middle">Web Site:</td>
    <td align="left" valign="middle"><input class="input" maxlength="100" name="commentSite" size="40" type="text" value="<? echo $commentSite; ?>"></td>
  </tr>
  <tr>
    <td align="left" class="form" valign="top">Comment:</td>
    <td align="left" valign="top"><textarea class="input" cols="38" name="commentText" rows="5" wrap="virtual"></textarea></td>
  </tr>
  <tr>
    <td><br></td>
    <td><input class="comment" name="Submit" type="submit" value="Submit"> <input class="comment" name="Cancel" onclick="void(window.close())" type="button" value="Cancel"></td>
  </tr>
  </table>
  </td>
</tr>
</form>
</table>
</body>
</html>


글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
황선미 고정 아이피에 대해서 질문 입니다. [3] 2007.08.10
simoom 포토샵에서 산맥표시할수 있는 방법좀.. [1] 2007.08.10
황인강 홈피가 느려지구 런타임 오류두 뜨구 그러네용  
이기현 노 프레임 상태에서 오른쪽과 왼쪽에 메뉴 넣는 방법좀 [3] 2007.08.10
박진우 포토샵 작업 이미지와 플래쉬 합성 질문입니다. [1] 2007.08.10
judas 노프레임에서 플래시 삽입 [1] 2007.08.10
박영은 즐겨찾기 해놓은 페이지들을볼려면 어떻게보는거죠?? [1] 2007.08.10
하느리 html이나 php로 msn메세지보내는방법  
신경만 iis가 에러가 났습니다. [1] 2007.08.10
신경만 iis가 에러가 났습니다.  
정성미 x-y.net에서 sql 사용하여 db관리 하려할때 어떻게 하나요? [3] 2007.08.10
이현우 포토샵 질문입니다. [2] file 2007.08.10
포블 노프레임홈에서 cguy님의 멤버리스트를 설치하려고 하는데요  
늴리리야 노프레임이 화면에 꽉 차도록-_-; [3] 2007.08.10
바람구두 서버에 하드 하나 달았는데요.. 새로운 드라이버 외부에서 접근 문제 [1] 2007.08.10
isis 여기처럼 새창을..하고 싶은데요..  
윤정현 포샵에서 작업한 이미지를 플래쉬로... [1] 2007.08.10
순진소년 로딩 지연 질문임돠~~ [1] 2007.08.10
상디 방문객의 아이피 모으는법 없을까요~~ [2] 2007.08.10
문영완 [iis+htaccess]IIS 에서는 .htaccess 를 사용할 수 없는지요? [4] 2007.08.10
조경래 이미지 맵이 안먹는데 왜그럴까요..ㅠ.ㅜ [1] 2007.08.10
임수현 홈피 만드는 초보자인데 질문있어염...빨리쩜... [1] 2007.08.10
노현우 원프래임 홈페이지만드는데 궁금한점이있어서 [1] 2007.08.10
Asparnel php 코딩관련 질문입니다~~  
박도석 PHP에서 자바 스크립트함수로 데이타 전송하는 방법 질문.. [1] 2007.08.10
couple99 초보적질문..급해욥^-^;;  
재로 포샵에서 그림배경 투명하게 하려면? [4] 2007.08.10
장승기 제품소개 메뉴를 만들려면.. [1] 2007.08.10
Nona 아이프레임에 관한겁니다  
새우깡 제로카운터 페이지 뷰에 질문있는데요.. [1] 2007.08.10