메뉴 건너뛰기

프로그램언어

조회 수 1308 추천 수 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. PHP 버전 숨기기 ( php version hide )

    Date2024.02.07 Views79
    Read More
  2. php 두날짜 사이의 모든날짜 배열 만들기

    Date2023.01.12 Views188
    Read More
  3. PHP str_replace php 문자열치환

    Date2023.01.12 Views202
    Read More
  4. PHP 이미지 리사이즈 함수 imagecopyresized

    Date2023.01.12 Views214
    Read More
  5. HTTP 인증하기, 로그인창 띄우기

    Date2021.03.26 Views215
    Read More
  6. [PHP기초] 상속기본

    Date2021.03.27 Views215
    Read More
  7. 코드 생성 하기

    Date2023.01.12 Views216
    Read More
  8. 폴더 용량 체크

    Date2023.01.12 Views225
    Read More
  9. PHP SimpleHtmlDom Parser로 HTML 파싱하기

    Date2023.01.12 Views225
    Read More
  10. 조건문의 함수실행 여부 if ( 0 && ... )

    Date2021.03.26 Views229
    Read More
  11. ereg(), eregi(), ereg_replace(), eregi_replace(), split() 대체

    Date2023.01.12 Views231
    Read More
  12. PHP 파일 업로드 FORM 처리

    Date2023.01.12 Views233
    Read More
  13. 배열 연산자 []= 에 대해서

    Date2021.03.26 Views234
    Read More
  14. 클래스와 인스턴스 그리고 메소드 만들기

    Date2021.03.27 Views235
    Read More
  15. 웹페이지 파싱

    Date2023.01.12 Views235
    Read More
  16. PHP 디렉토리안에 파일 리스트 가져오기

    Date2023.01.12 Views237
    Read More
  17. php www 붙이기

    Date2023.01.12 Views239
    Read More
  18. 상수, 마법상수, 모든 상수 보기

    Date2021.03.26 Views240
    Read More
  19. PHP http -> https 로 전환

    Date2023.01.12 Views240
    Read More
  20. PHP 하위 디렉토리 포함 디렉토리 리스트 출력

    Date2023.01.12 Views240
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17

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

© k2s0o1d4e0s2i1g5n. All Rights Reserved