메뉴 건너뛰기

프로그램언어

조회 수 1302 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
<meta http-equiv="page-enter" content="revealtrans(duration=1, transition=18)" /><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=euc-kr" /><meta http-equiv="page-enter" content="revealtrans(duration=1, transition=18)" />원본사진은 photo 에 만들고
작은사진은 photo/small 에 만든다

// photo/index.php 의 내용 ============================




<?php

function phpls($dir)
{
$handle=opendir($dir);
while ($file = readdir($handle))
{
$list[] = $file;
}
closedir($handle);
return $list;
}

$dir="./small/"; // 현재 디렉토리

$dir=phpls($dir);
print"
<script language="JavaScript"> <br> <br> </script>



";
$aa=0;

while (list($key,$value) = each($dir))
{
if (strlen($value)>5) { $value1="./".$value; }
if ($value) {
if (eregi(".JPG",$value1)) {
$img .= "";
}

if ($key%6==0) { $img .= ""; }
}
}
$img .= "

img_view.php?card=$value','','scrollbars=yes,width=800,height=600')\\"' alt="$value1">
$key: $value1
$value1

";
?>
<?=$img?>





//photo/img_view.php 의 내용 ==============================================






<script language="JavaScript"> <br> <br> </script>











<?

function img_resize($filename,$pixel)
{
$image_size = GetImageSize($filename);

if($image_size[0])
{
if($image_size[0] > $pixel)
{
$resize = $pixel / $image_size[0];
$re_height = (int)($image_size[1] * $resize);
$upload_image2 =" width=$pixel height=$re_height ";
}
if($image_size[1] > $pixel)
{
$resize = $pixel / $image_size[1];
$re_width = (int)($image_size[0] * $resize);
$upload_image2 =" width=$re_width height=$pixel ";
}
}

$upload_image1="
//if($image_size) if($image_size[0] > $pixel) $upload_image2 =" width=$pixel height=$re_height ";
$upload_image = $upload_image1.$upload_image2." name='img_view' onclick=\\".javascriptwindow.close();\\" style=\\"cursor:hand;\\" border=0 alt='$filename'>";
//print"
$upload_image;";
return $upload_image;
}


$card1="./".$card;
$filename = "./".$card;
$pixel = "700";

$imgg= img_resize($filename,$pixel);

?>






<?
print"$imgg";
?>






<script language="javascript"> <br> <br></script>

//=================================================================

하면 자동으로 사진 리스트 만들고 그것을 클릭하면 큰사진 보여주고 .하는 프로그램입니다.
프로그램 여기저기 조림한거라 프로님들께서 조금 다듬어 주세요

List of Articles
번호 제목 날짜 조회 수
120 다중파일 업로드 + 이미지 미리보기 (Javascript, jQuery ) file 2020.12.15 914
119 단어필터링 2019.01.08 1251
118 대소문자 바꾸기 (strtoupper, strtolower) 2016.12.23 19658
117 도메인 앞에 자동으로 WWW를 붙이는 방법 2017.03.07 18885
116 두 날짜 사이의 차이 구하기 2017.03.07 18866
115 디렉토리 안의 파일의 내용들을 읽는 예 2016.12.23 19012
114 디렉토리내 특정 확장자를 가진 파일 전부 삭제 file 2015.04.14 25515
113 디렉토리의 제어 2019.01.08 1222
112 디비내용을 엑셀 파일로 다운로드 시키는 방법 2019.01.08 1391
111 로그인페이지에서 온 경우/로그인한 페이지로 이동 2016.12.23 18847
110 로또 숫자 랜덤하게 1~45까지 숫자 빼오기 2014.02.27 25438
109 리다이렉션(페이지 이동)의 3가지 방법, location.href 2017.03.07 40257
108 리스트 페이징 2014.02.27 19386
107 링크를 걸때 http 처리방법 2016.12.23 19019
106 마우스 오버시 사진변환, 파일에러시 대체이미지 적용(소스일부) 2018.07.24 4584
105 멀티 파일다운로드 꽁수로 구현하기 2020.06.19 438
104 메모장소스 2019.01.08 2000
103 메일주소의 골뱅이를 그림처리하기 2017.03.06 15508
102 몫과 나머지 구하기 2017.03.07 18471
101 무조건 알아야 할 PHP 속도 테스트 14 가지 2014.02.27 30280
Board Pagination Prev 1 ... 7 8 9 10 11 12 13 14 15 16 17 Next
/ 17

하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved