메뉴 건너뛰기

프로그램언어

조회 수 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
번호 제목 날짜 조회 수
240 addslashes — 문자열을 슬래시로 인용 2016.12.23 23083
239 stripslashes — 따옴표 처리한 문자열을 풉니다 2016.12.23 20486
238 stripcslashes — addcslashes()로 인용한 문자열을 되돌림 2016.12.23 20442
237 implode — 문자열로 배열 원소를 결합 2016.12.23 19951
236 mysql_insert_id 2016.12.23 18750
235 mysql_result — 결과 데이터를 반환 2016.12.23 18958
234 parse_ini_file — Parse a configuration file 2016.12.23 19774
233 mysql_affected_rows — 최근 MySQL 작업으로 변경된 행 개수를 얻음 2016.12.23 18807
232 is_array — 변수가 배열인지 확인 2016.12.23 18048
231 ini_get - php.ini에 지정되어 있는 지시어의 값을 읽어온다 2016.12.23 19520
230 class_exists 클래스가 정의되었는지 확인 2016.12.23 19881
229 mysql_real_escape_string 이진 데이터를 입력할 경우 이 함수를 사용해야 함 2016.12.23 18635
228 call_user_func 사용자가 정의한 함수를 호출하여 실행고자 할 때 사용 2016.12.23 21305
227 array_key_exists 배열에서 key가 존재하는지 확인 2016.12.23 22206
226 quotemeta 모든 메타 문자앞에 역슬래쉬를 붙인 문자열을 반환 2016.12.23 20461
225 array_push 배열 끝에 하나 이상의 요소를 추가 2016.12.23 21604
224 glob 현재 디렉토리에서 pattern에 일치하는 경로 이름을 배열로 반환 2016.12.23 19636
223 gd_info 사용 가능한 GD 라이브러리에 대한 정보를 배열로 반환 2016.12.23 17989
222 headers_sent 헤더 전송 여부를 확인 2016.12.23 19409
221 fileatime 파일에 최종적으로 접근한 시간을 반환 2016.12.23 18117
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17

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

© k2s0o1d4e0s2i1g5n. All Rights Reserved