<fieldset id="40u2s"><dd id="40u2s"></dd></fieldset>
  • <fieldset id="40u2s"></fieldset>
    <\/li>\n
  • <\/li>\n
  • <\/li>\n
  • <\/li>\n
  • <\/form><\/li>\n
  • <\/body><\/li>\n
  • <\/html> <\/li>\n<\/ol><\/div>\n???碼<\/em>\n<\/div>\n<\/div>\n<\/td><\/tr><\/table>\n\n\n\n
    \n<\/div>\n\n
    <\/div>\n

    "}

    国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

    ? ??? ?? PHP ???? ??? PHP ?? ??? ?? ???

    ??? PHP ?? ??? ?? ???

    Jul 25, 2016 am 09:08 AM

    1. //-------------------------- -----------
    2. // ?? ??: ?? ??? ?? ???
    3. // ?? ???: Jesse Lee
    4. //------------ --------------------------
    5. ??? ??? {
    6. var $dir; //?? ??? ???? ??? ????
    7. var $time ; //??? ?? ?? ??? ??
    8. var $allow_types; //??? ?? ?? ?? ??
    9. var $field; //??? ?? ??
    10. var $maxsize; ??? KB???.
    11. var $thumb_width; //??? ??
    12. var $thumb_height; //??? ??
    13. var $watermark_file; //???? ??? ??
    14. //???? ??
    15. var $watermark_trans;//???? ???
    16. //???
    17. //$types: ???? ???? ?? ??, $maxsize: ?? ??, $field: ??? ?? ??, $time: ??? ?? ??? ??
    18. ?? ???($types = 'jpg|png', $maxsize = 1024, $field = 'attach', $time = '') {
    19. $this->allow_types =explore('|',$ ??);
    20. $this->maxsize = $maxsize * 1024;
    21. $this->field = $field;
    22. $this->time = $time : time() ;
    23. }
    24. //??? ????? ???? ???? ?? ? ??
    25. //$basedir: ?? ????, ?? ???? ?
    26. //$filedir: ??? ?? ?? ????, ?? ??? ???? { y }, {m}, 377j5v51b
    27. function set_dir($basedir,$filedir = '') {
    28. $dir = $basedir;
    29. !is_dir($dir) && @mkdir($dir , 0777);
    30. if (!empty($filedir)) {
    31. $filedir = str_replace(array('{y}','{m}','{y}'),array(date( ' Y',$this->time),date('m',$this->time),date('d',$this->time)),strtolower($filedir));
    32. $dirs = ??('/',$filedir);
    33. foreach ($dirs? $d?) {
    34. !empty($d) && $dir .= $d.'/';
    35. ! is_dir($dir) && @mkdir($dir,0777);
    36. }
    37. }
    38. $this->dir = $dir;
    39. }
    40. //?? ??? ??, ???? ???? ??? ??? ??? ????.
    41. //$width: ??? ??, $height: ??? ??
    42. function set_thumb ($width = 0, $height = 0) {
    43. $this -> ;thumb_width = $width;
    44. $this->thumb_height = $height;
    45. }
    46. //?? ???? ??, ????? ???? ??? ?? ?? ??
    47. //$file : ???? ?? , $pos: ???? ??, $trans: ???? ???
    48. function set_watermark ($file, $pos = 6, $trans = 80) {
    49. $this->watermark_file = $file;
    50. $this ->watermark_pos = $pos;
    51. $this->watermark_trans = $trans;
    52. }
    53. /*----------------- --------- --------------- ---------
    54. ?? ??? ??, ?? ? ??? ?? ?? ??? ???? ?? ?? ??? ?????.
    55. ???: name? ?? ????, ???? ???? ? ??? ???? ?? ????, ??? ?? ? ?? ?? ?????.
    56. dir? ??? ?? ??? ??? ?? ?????.
    57. size? ???? ??? ?? ? ?? ???? ????.
    58. ???? ?? ?????, 1? ??? ????, -1? ?? ??? ???? ??? ????, - 2? ?? ??? ------------------- ---- ------ */
    59. function excute() {
    60. $files = array() //?? ?? ??? ??
    61. $field = $this->field;
    62. $keys = array_keys($_FILES[$field]['name']);
    63. foreach ($keys? $key?) {
    64. if (!$_FILES[ $field]['name'][$key]) ??;
    65. $fileext = $this->fileext($_FILES[$field]['name'][$key ]) // ?? ??? ????
    66. $filename = $this->time.mt_rand(100,999).'.'.$fileext; //?? ?? ??
    67. $filedir = $this-> ?? ?? ?? ????
    68. $filesize = $_FILES[$field]['size'][$key] //?? ??
    69. //?? ??? ???? ??
    70. if (!in_array( $fileext,$this->allow_types)) {
    71. $files[$key]['name'] = $_FILES[$field]['name'][$key];
    72. $files[$ key]['flag'] = -1;
    73. continue;
    74. }
    75. //?? ??? ?????
    76. if ($filesize > $this->maxsize) {
    77. $files [$key]['name'] = $_FILES[$field]['name'][$key];
    78. $files[$key]['flag'] = -2;
    79. ??;
    80. }
    81. $files[$key]['name'] = $filename;
    82. $files[$key]['dir'] = $filedir;
    83. $files[$key]['size'] = $filesize;
    84. //???? ??? ???? ?? ??? ?????
    85. if (is_uploaded_file($_FILES[$field]['tmp_name'][$key])) {
    86. move_uploaded_file($_FILES [$ ??]['tmp_name'][$key],$filedir.$filename);
    87. @unlink($_FILES[$field]['tmp_name'][$key]);
    88. $files[ $key ]['flag'] = 1;
    89. //??? ???? ? ??? ??
    90. if (in_array($fileext,array('jpg','png','gif'))) {
    91. if ($this->thumb_width) {
    92. if ($this->create_thumb($filedir.$filename,$filedir.'thumb_'.$filename)) {
    93. $files[$ key] ['thumb'] = 'thumb_'.$filename; //??? ?? ??
    94. }
    95. }
    96. $this->create_watermark($filedir.$filename);
    97. }
    98. }
    99. }
    100. return $files;
    101. }
    102. //??? ??, ??? ???? ?? ??? ??
    103. //Php.aspx_file: ?? ??? ??, $ Thumb_file : ??? ??
    104. function create_thumb (Php.aspx_file,$thumb_file) {
    105. $t_width = $this->thumb_width;
    106. $t_height = $this->thumb_height;
    107. if ( !file_exists(Php.aspx_file) ) return false;
    108. Php.aspx_info = getImageSize(Php.aspx_file);
    109. //?? ???? ????? ??? ??? ?? ???? ???? ??
    110. if ( Php. aspx_info[0] <= $t_width && Php.aspx_info[1] <= $t_height) {
    111. if (!copy(Php.aspx_file,$thumb_file)) {
    112. return false;
    113. }
    114. return true;
    115. }
    116. //??? ??? ????? ??
    117. if (Php.aspx_info[0] - $t_width > Php.aspx_info[1] - $t_height) {
    118. $ t_height = ($t_width / Php.aspx_info[0]) * Php.aspx_info[1];
    119. } else {
    120. $t_width = ($t_height / Php.aspx_info[1]) * Php .aspx_info[0 ];
    121. }
    122. //?? ??? ????
    123. $fileext = $this->fileext(Php.aspx_file);
    124. ???($fileext) {
    125. ??? 'jpg' :
    126. Php.aspx_img = ImageCreateFromJPEG(Php.aspx_file); break;
    127. ??? 'png' :
    128. Php.aspx_img = ImageCreateFromPNG(Php.aspx_file) break;
    129. ??? 'gif' :
    130. Php.aspx_img = ImageCreateFromGIF(Php.aspx_file); break;
    131. }
    132. //?? ?? ??? ??? ??
    133. $thumb_img = @ImageCreateTrueColor($t_width,$t_height) ;
    134. //The ImageCopyResampled ??? ??? ???? ????? ? ??? ????? ?????
    135. if (function_exists('imagecopyresampled')) {
    136. @ImageCopyResampled($thumb_img,Php.aspx_img,0,0,0, 0,$t_width, $t_height,Php.aspx_info[0],Php.aspx_info[1]);
    137. } else {
    138. @ImageCopyReised($thumb_img,Php.aspx_img,0,0,0,0, $t_width,$t_height ,Php.aspx_info[0],Php.aspx_info[1]);
    139. }
    140. //??? ??
    141. switch ($fileext) {
    142. case 'jpg' :
    143. ImageJPEG($ Thumb_img,$thumb_file); break;
    144. case 'gif' :
    145. ImageGIF($thumb_img,$thumb_file); break;
    146. case 'png' :
    147. ImagePNG($ Thumb_img,$thumb_file); break;
    148. }
    149. //?? ??? ??
    150. @ImageDestroy(Php.aspx_img);
    151. @ImageDestroy($thumb_img);
    152. return true;
    153. }
    154. //??? ???? ??
    155. //$file: ????? ??
    156. function create_watermark($file) {
    157. //??? ???
    158. ? ?????. (!file_exists( $this->watermark_file) || !file_exists($file)) return;
    159. if (!function_exists('getImageSize')) return;
    160. //???? ?? ?? ?? by GD
    161. $gd_allow_types = array();
    162. if (function_exists('ImageCreateFromGIF')) $gd_allow_types['image/gif'] = 'ImageCreateFromGIF';
    163. if (function_exists('ImageCreateFromPNG')) $gd_allow_types['image /png'] = 'ImageCreateFromPNG';
    164. if (function_exists('ImageCreateFromJPEG')) $gd_allow_types['image/jpeg'] = 'ImageCreateFromJPEG';
    165. //?? ?? ????
    166. $fileinfo = getImageSize ($file);
    167. $wminfo = getImageSize($this->watermark_file);
    168. if ($fileinfo[0] < $wminfo[0] || $fileinfo[1] < $wminfo[ 1]) ??;
    169. if (array_key_exists($fileinfo['mime'],$gd_allow_types)) {
    170. if (array_key_exists($wminfo['mime'],$gd_allow_types)) {
    171. //???? ??? ??
    172. $temp = $gd_allow_types[$fileinfo['mime']]($file);
    173. $temp_wm = $gd_allow_types[$wminfo['mime'] ]($this- >watermark_file);
    174. //???? ??
    175. ??? ($this->watermark_pos) {
    176. ?? 1 : //?? ??
    177. $dst_x = 0; = 0; ??;
    178. ?? 2: //?? ??
    179. $dst_x = ($fileinfo[0] - $wminfo[0]) / 2; $dst_y = 0; //??? ?
    180. $dst_x = $fileinfo[0]; $dst_y = 0; break;
    181. ?? 4: //?? ??
    182. $dst_y = $fileinfo[1]; break;
    183. ?? 5: //??? ??? ???
    184. $dst_x = ($fileinfo[0] - $wminfo[0]) / 2; $dst_y = $fileinfo[1] break;
    185. ?? 6: //??? ??
    186. $dst_x = $fileinfo[0]-$wminfo[0] $dst_y = $fileinfo[1]-$wminfo[1] break;
    187. ???: // ???
    188. $dst_x = mt_rand(0,$fileinfo[0]-$wminfo[0]) $dst_y = mt_rand(0,$fileinfo[1]-$wminfo[1]);
    189. }
    190. if (function_exists(' ImageAlphaBlending')) ImageAlphaBlending($temp_wm,True); //??? ??? ?? ??
    191. if (function_exists('ImageSaveAlpha')) ImageSaveAlpha($temp_wm,True); ?? ?? ??
    192. //???? ???? ??
    193. if (function_exists('imageCopyMerge')) {
    194. ImageCopyMerge($temp,$temp_wm,$dst_x,$dst_y,0,0,$wminfo[ 0],$wminfo[ 1],$this->watermark_trans);
    195. } else {
    196. ImageCopyMerge($temp,$temp_wm,$dst_x,$dst_y,0,0,$wminfo[0], $wminfo[1]) ;
    197. }
    198. //??? ??
    199. switch ($fileinfo['mime']) {
    200. case 'image/jpeg' :
    201. @imageJPEG($ temp,$file);
    202. break;
    203. case 'image/png' :
    204. @imagePNG($temp,$file);
    205. break;
    206. case 'image/gif' :
    207. @imageGIF($temp ,$file);
    208. break;
    209. }
    210. //???? ??? ??
    211. @imageDestroy($temp);
    212. @imageDestroy($temp_wm );
    213. }
    214. }
    215. }
    216. //?? ??? ????
    217. function fileext($filename) {
    218. return strtolower(substr(strrchr($filename,'.')), 1,10));
    219. }
    220. }
    221. ?>
    ?? ??

    ?? ?:

    1. if ($_GET['action'] == 'save') {
    2. $up = new upload();
    3. $up->set_dir(dirname(__FILE__).'/upload/','{y}/{m}');
    4. $up->set_thumb(100,80 );
    5. $up->set_watermark(dirname(__FILE__).'/jblog/images/watermark.png',6,90);
    6. $fs = $up->execute();
    7. var_dump($fs);
    8. }
    9. ?>
    10. test
    ???碼


    ? ????? ??
    ? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

    ? AI ??

    Undresser.AI Undress

    Undresser.AI Undress

    ???? ?? ??? ??? ?? AI ?? ?

    AI Clothes Remover

    AI Clothes Remover

    ???? ?? ???? ??? AI ?????.

    Video Face Swap

    Video Face Swap

    ??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

    ???

    ??? ??

    ???++7.3.1

    ???++7.3.1

    ???? ?? ?? ?? ???

    SublimeText3 ??? ??

    SublimeText3 ??? ??

    ??? ??, ???? ?? ????.

    ???? 13.0.1 ???

    ???? 13.0.1 ???

    ??? PHP ?? ?? ??

    ???? CS6

    ???? CS6

    ??? ? ?? ??

    SublimeText3 Mac ??

    SublimeText3 Mac ??

    ? ??? ?? ?? ?????(SublimeText3)

    ???

    ??? ??

    ?? ????
    1742
    16
    Cakephp ????
    1596
    56
    ??? ????
    1536
    28
    PHP ????
    1396
    31
    ???
    PHP ?? API ????? ?? ??? ?????? PHP ?? API ????? ?? ??? ?????? Jun 14, 2025 am 12:27 AM

    ToversionAphp ??, forclarityandeasofrouting, ac

    PHP?? ?? ? ??? ????? ????????? PHP?? ?? ? ??? ????? ????????? Jun 20, 2025 am 01:03 AM

    TOSECURELYHANDLEAUSTENCENDACTIONANDACTERIZINGINPHP, FORCUCTSESTEPS : 1. ALWAYSHASHPASSWORTHPASSWORD_HASH () ? VERVERIFYUSINGPANSWORD_VERIFY (), usePREPAREDSTATEMENTSTOPREVENTSQLINGERGED, andSTOREUSERSESSEATAIN $ _SESSIONSAFTERLOGIN.2.impleplempletrole ?? ACCESSC

    PHP? ?? ? ?? ?? ????? ????? ???? ?????? PHP? ?? ? ?? ?? ????? ????? ???? ?????? Jun 14, 2025 am 12:25 AM

    ProceduralAndObject-OrientedProgramming (OOP) InphpDiffersiMINTIFINTIONTERINGLISTURE, ??? ? ? DATAHANDLING

    PHP? ?? ?? (??)? ???? ?? ?? ? ? ????? PHP? ?? ?? (??)? ???? ?? ?? ? ? ????? Jun 14, 2025 am 12:25 AM

    phpdoesnothaveAbuilt-inweakMapButofferSweakReference.1.WeakReenceAllowsholdingReferences withoutpreventinggarbageCollection.2.ItusteForCaching, Eventlisteners, andMetAdataWithoutAftingObjectLifeCycles.3.youcoucococococococcinccing

    PHP?? ?? ???? ??? ??? ?? ? ? ??????? PHP?? ?? ???? ??? ??? ?? ? ? ??????? Jun 19, 2025 am 01:05 AM

    PHP?? ?? ???? ???? ????? ??? ?? ??? ???? ?? ??? ??? ??? ???? ????. 1. finfo_file ()? ???? ?? ?? ??? ???? ???/jpeg? ?? ?? ?? ? ?????. 2. uniqid ()? ???? ??? ?? ??? ???? ? Web ?? ????? ??????. 3. php.ini ? html ??? ?? ?? ??? ???? ???? ??? 0755? ?????. 4. Clamav? ???? ???? ???? ??? ??????. ??? ??? ?? ???? ????? ???? ?? ??? ????? ???? ??? ? ??? ?????.

    PHP?? == (??? ??)? === (??? ??)? ???? ?????? PHP?? == (??? ??)? === (??? ??)? ???? ?????? Jun 19, 2025 am 01:07 AM

    PHP?? ==? ==? ?? ???? ?? ??? ??????. == ?? ??? ?? ?? ?????. ?? ??, 5 == "5"? true? ????, ?? ??? ???? ?? ?? ??? ????? ????? (? : 5 === "5"? false? ?????. ?? ?????? ===? ? ???? ?? ?????? == ?? ??? ??? ???? ?????.

    PHP? NOSQL ?????? (? : MongoDB, Redis)? ??? ?? ??? ? ????? PHP? NOSQL ?????? (? : MongoDB, Redis)? ??? ?? ??? ? ????? Jun 19, 2025 am 01:07 AM

    ?, PHP? ?? ?? ?? ?????? ?? MongoDB ? Redis? ?? NOSQL ??????? ?? ??? ? ????. ?? MongoDBPHP ???? (PECL ?? Composer? ?? ??)? ???? ????? ????? ??? ?????? ? ???? ????? ??, ??, ?? ? ?? ??? ?????. ??, Predis ????? ?? Phpredis ??? ???? Redis? ???? ?? ? ?? ? ??? ???? ??? ????? Phpredis? ???? ?? Predis? ?? ??? ?????. ? ? ?? ??? ???? ? ????? ????.

    php (, -, *, /, %)?? ?? ??? ??? ?????? php (, -, *, /, %)?? ?? ??? ??? ?????? Jun 19, 2025 pm 05:13 PM

    PHP?? ?? ??? ??? ???? ??? ??? ????. 1. ?? ??? ?? ? ?? ??? ??? ???? ???? ??? ? ????. ??? ??? ???? ????? ????? ???? ????. 2. ?? ?? ?? - ??, ??? ???? ?? ??? ?????. 3. ?? ???? ??? ??? ???? ??? ??? ?????. 4. Division? / ??? ???? 0?? ??? ?? ????? ??? ?? ??? ?? ? ? ????. 5. ???? ??? ???? ?? ?? ? ?? ??? ???? ? ??? ? ???, ??? ?? ? ? ??? ??? ???? ?????. ? ???? ???? ???? ??? ??? ??? ???? ?? ??? ? ??????? ????.

    See all articles