메뉴 건너뛰기

프로그램언어

조회 수 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>

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

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

  1. 리다이렉션(페이지 이동)의 3가지 방법, location.href

    Date2017.03.07 Views40257
    Read More
  2. [PHP] 게시판 글쓰기와 이미지 파일 DB 저장 및 불러오기 예제

    Date2017.02.19 Views35889
    Read More
  3. $_SERVER 환경변수

    Date2016.09.21 Views33237
    Read More
  4. PHP에서 PDF파일 생성하기

    Date2014.02.27 Views32777
    Read More
  5. PHP에서 자바스크립트 값 가져오기

    Date2014.02.27 Views31635
    Read More
  6. Class를 이용한 DB Connection 소스 (Oracle, MyS

    Date2014.02.27 Views30504
    Read More
  7. htmlentities <-> html_entity_decode (엔티티

    Date2014.04.12 Views30452
    Read More
  8. 무조건 알아야 할 PHP 속도 테스트 14 가지

    Date2014.02.27 Views30280
    Read More
  9. PHP로 Excel 파일 만들기...

    Date2014.02.27 Views30257
    Read More
  10. Text를 GD 이미지로 뿌리기

    Date2014.02.27 Views29813
    Read More
  11. php 엑셀 다운로드 구현

    Date2017.03.07 Views29790
    Read More
  12. 글내용 이미지 리사이징

    Date2014.02.27 Views29446
    Read More
  13. 쿠키변수받기

    Date2014.02.27 Views29211
    Read More
  14. Record Drag/Drop Position

    Date2014.02.27 Views29201
    Read More
  15. 간단한 PHP 파일 업로드, 다운로드 구현

    Date2017.03.06 Views28547
    Read More
  16. DB상의 많은 파일을 한꺼번에 다운받기

    Date2014.02.27 Views28332
    Read More
  17. GD를 이용한 스팸성 게시물 차단을 위한 보안 단어 입력 예제

    Date2014.02.27 Views26945
    Read More
  18. 주간날짜 뽑아오기

    Date2014.02.27 Views26731
    Read More
  19. 전화번호에 하이픈(-) 넣기

    Date2015.04.14 Views26622
    Read More
  20. PHP 변수전달 GET, POST

    Date2015.04.14 Views26578
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17

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

© k2s0o1d4e0s2i1g5n. All Rights Reserved