본문에서 이미지 확대(이미지 클릭) 안되게 정보
본문에서 이미지 확대(이미지 클릭) 안되게본문
질문 답변에서 찾았는데 활용팁에 없는것 같아 올립니다.
view.skin.php
<?
// 첨부파일 출력
$data_path = $g4['path'] . "/data/file/$bo_table";
for ($i=0; $i<=count($view[file]); $i++) {
$file_view = $view[file][$i][file];
$file = $data_path ."/".$file_view;
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) { //이미지 파일이 있다면
$w = $view[file][$i][image_width];
$h = $view[file][$i][image_height];
if ($w < 300 && $h < 300) //사이즈 지정
echo "<img src='$file' border='0'>\n"; //지정 사이즈보다 작을때는 원본 그대로 출력
else
echo "<img src='$file' width='300' border='0'>\n"; //사이즈지정 - 비율유지를 위하여 세로는 지정안함.
echo "<p>\n";
}
}
?>
view.skin.php
<?
// 첨부파일 출력
$data_path = $g4['path'] . "/data/file/$bo_table";
for ($i=0; $i<=count($view[file]); $i++) {
$file_view = $view[file][$i][file];
$file = $data_path ."/".$file_view;
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) { //이미지 파일이 있다면
$w = $view[file][$i][image_width];
$h = $view[file][$i][image_height];
if ($w < 300 && $h < 300) //사이즈 지정
echo "<img src='$file' border='0'>\n"; //지정 사이즈보다 작을때는 원본 그대로 출력
else
echo "<img src='$file' width='300' border='0'>\n"; //사이즈지정 - 비율유지를 위하여 세로는 지정안함.
echo "<p>\n";
}
}
?>
추천
2
2
댓글 3개

감사합니다 ^^

감사해요
감사합니다