Changeset 9095 for temp/trunk
- Timestamp:
- 2006/11/27 11:15:51 (20 years ago)
- File:
-
- 1 edited
-
temp/trunk/data/class/SC_Image.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/data/class/SC_Image.php
r9092 r9095 71 71 imagecopyresampled($dst_im, $src_im, 0, 0, 0,0, $zip_width, $zip_height, $src_w, $src_h); 72 72 73 // ²èÁü½ÐÎÏ74 // header("Content-Type: image/gif");75 // ImageGIF($dst_im);76 // ImageDestroy($dst_im);77 78 73 // °ì°Õ¤ÊID¤ò¼èÆÀ¤¹¤ë¡£ 79 74 $uniqname = date("mdHi") . "_" . uniqid(""); 80 $filename = $uniqname . ".gif"; 75 76 // ¥Õ¥¡¥¤¥ë¤Î³ÈÄ¥»Ò¼èÆÀ 77 $arrFileInfo = pathinfo($file); 78 $extension = $arrFileInfo["extension"]; 79 80 // ¥Õ¥¡¥¤¥ë̾¡¢ÊݸÀèÀßÄê 81 $filename = $uniqname . $extension; 81 82 $path = $dir . "/" . $filename; 83 84 // ¥Õ¥¡¥¤¥ë¤Î³ÈÄ¥»Ò¤Ë¤è¤Ã¤Æ½èÍý¤òʬ¤±¤ë 82 85 if(is_dir($dir)) { 83 ImageGIF($dst_im, $path); 86 switch ($extension) { 87 case "jpg": 88 case "jpeg": 89 ImageJPEG($dst_im, $path); 90 break; 91 case "gif": 92 ImageGIF($dst_im, $path); 93 break; 94 case "png": 95 ImagePNG($dst_im, $path); 96 break; 97 case "default": 98 print("³ÈÄ¥»Ò¤¬ÉÔÀµ¤Ç¤¹¡£"); 99 return ""; 100 } 84 101 return $path; 85 102 }
Note: See TracChangeset
for help on using the changeset viewer.
