다른페이지에서 변수사용 어떻게 하나요? 정보
다른페이지에서 변수사용 어떻게 하나요?본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
<?
include "../board/common.php";
$ann = sql_fetch(" select * from g4_write_ann where ca_name='이달의 이벤트' order by wr_id desc limit 1");
$pic = sql_fetch(" select * from g4_board_file where bo_table='ann' order by wr_id desc limit 1");
$subject=$ann[wr_subject];
$content=$ann[wr_content];
$picture=$pic[bf_file];
?>
<td height="65" width="68">
<img src="http://www.ijak.co.kr/board/data/file/ann/<?=$picture?>" width="68" height="68" border="0" /></td>
</tr>
</table></td>
<td class="f12"><span class="f12B"><?=$subject?></span> <br />
<?=cut_str(nl2br($content), 40, '...');?></td>
</tr>
</table></td >
이렇게 코딩했는데요
자바스크립트로 에러가 나네요 "잘못된 방법으로 변수가 정의되었습니다" 라고 뜹니다
common.php파일내에 112번째 줄안에
if (!$g4_path || preg_match("/:\/\//", $g4_path))
die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('잘못된 방법으로 변수가 정의되었습니다.'); </script>");
있는 내용같은데요 어떤 식으로 변수선언을 해야 하는지 깜깜하네요
고수님들 한수만 가르쳐 주시만 정말 감사하겠습니다 ^^;
오류 주소 :
<?
include "../board/common.php";
$ann = sql_fetch(" select * from g4_write_ann where ca_name='이달의 이벤트' order by wr_id desc limit 1");
$pic = sql_fetch(" select * from g4_board_file where bo_table='ann' order by wr_id desc limit 1");
$subject=$ann[wr_subject];
$content=$ann[wr_content];
$picture=$pic[bf_file];
?>
<td height="65" width="68">
<img src="http://www.ijak.co.kr/board/data/file/ann/<?=$picture?>" width="68" height="68" border="0" /></td>
</tr>
</table></td>
<td class="f12"><span class="f12B"><?=$subject?></span> <br />
<?=cut_str(nl2br($content), 40, '...');?></td>
</tr>
</table></td >
이렇게 코딩했는데요
자바스크립트로 에러가 나네요 "잘못된 방법으로 변수가 정의되었습니다" 라고 뜹니다
common.php파일내에 112번째 줄안에
if (!$g4_path || preg_match("/:\/\//", $g4_path))
die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('잘못된 방법으로 변수가 정의되었습니다.'); </script>");
있는 내용같은데요 어떤 식으로 변수선언을 해야 하는지 깜깜하네요
고수님들 한수만 가르쳐 주시만 정말 감사하겠습니다 ^^;