변수값을 얻고자 할 때 정보
변수값을 얻고자 할 때
본문
아래에서 $view_img[$j] 에 값을 넣을 때는 어떻게 하나요.
이미지 경로로 불러오고 싶은데 안되네요.
아래 문법이 맞는지는 모릅니다. ㅠㅠ
<?
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no limit 0, 6 ";
$result2 = sql_query($sql2);
for ($j=0; $row2 = sql_fetch_array($result2); $j++) {
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no limit 0, 6 ";
$result2 = sql_query($sql2);
for ($j=0; $row2 = sql_fetch_array($result2); $j++) {
$view_img[$j] = "$g4[url]/data/file/$bo_table/$row2[bf_file]";
$n += 0;
?>
<script language="JavaScript">
<!--
function transimg(place) {
if (place==<?=$n?>) imgg.src="<? echo "$view_img[$j]" ?>";
}
// -->
</script>
<? } ?>
?>
<script language="JavaScript">
<!--
function transimg(place) {
if (place==<?=$n?>) imgg.src="<? echo "$view_img[$j]" ?>";
}
// -->
</script>
<? } ?>
댓글 전체
//파일 뽑기
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$list[$i][wr_id]}' order by bf_no limit 0, 1 ";
$row2 = sql_fetch($sql2);
if ($i && $i%$mod==0)
echo "</tr><tr><td colspan='{$mod}' height=20></td></tr><tr>";
$filename = $row2[bf_file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = @getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
혹시 이거 찾으세요...유아원님 것입니다
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$list[$i][wr_id]}' order by bf_no limit 0, 1 ";
$row2 = sql_fetch($sql2);
if ($i && $i%$mod==0)
echo "</tr><tr><td colspan='{$mod}' height=20></td></tr><tr>";
$filename = $row2[bf_file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = @getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
혹시 이거 찾으세요...유아원님 것입니다