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

? ??? ?? PHP ???? PHP ??? ?? ??, PHP ??? ?? ???

PHP ??? ?? ??, PHP ??? ?? ???

Jul 25, 2016 am 09:06 AM

????? ????? ???? ????? ?? ??? PHP? ??? ? ????. ???? ???? ?????. ???? ???? ?? ???? ??? ???? ???? ???? ?? ???? ?? ???? ???? ?? ??? ???? ??? ??? ? ????. http://www.pooy.net/phpphp.html


  1. *exif_imagetype -- ??? ?? ??
  2. *?? ?? ????: http://www.pooy.net/phpphp.html
  3. *??: ???? ?? ?? ???? ?? ??? ???? ??? ?????
  4. * ???? ??: ??? ???? ?? ??? ????, ? ???? ?? ?? ??? ?????. , ? ???? ?? ??, ? ???? ?? ??
  5. */
  6. // ??? ??? ??? ????, ??? ?? ???, ?? ??, ?? ??
  7. ?? my_image_resize ($src_file, $dst_file, $new_width, $new_height) {
  8. $new_width= intval($new_width);
  9. $new_height=intval($new_width)
  10. if($new_width <1 || $new_height <1) {
  11. echo "???? ?? ?? ?? ?? !";
  12. exit();
  13. }
  14. if(!file_exists($src_file)) {
  15. echo $src_file . " ???? ???? !";
  16. exit() ;
  17. }
  18. // ??? ??
  19. $type=exif_imagetype($src_file);
  20. $support_type=array(IMAGETYPE_JPEG , IMAGETYPE_PNG , IMAGETYPE_GIF);
  21. if(!in_array($type, $support_type,true)) {
  22. echo "? ??? ???? ???? ????! jpg, gif ?? png? ?????.";
  23. exit();
  24. }
  25. //??? ??
  26. switch($type) {
  27. case IMAGETYPE_JPEG :
  28. $src_img=imagecreatefromjpeg($src_file);
  29. break;
  30. case IMAGETYPE_PNG :
  31. $src_img=imagecreatefrompng($src_file);
  32. break;
  33. case IMAGETYPE_GIF :
  34. $src_img=imagecreatefromgif($src_file);
  35. break;
  36. ???:
  37. echo "?? ??? ??!";
  38. ??();
  39. }
  40. $w=imagesx($src_img);
  41. $h=imagesy($src_img);
  42. $ratio_w=1.0 * $new_width / $w;
  43. $ratio_h=1.0 * $new_height / $h;
  44. $ratio=1.0;
  45. // ??? ???? ??? ??? ???? ??? ??? ???? ???. ? ??? ???? ? ??? ??? ????(?? ??? ????? ????)
  46. if( ($ratio_w < 1 && $ratio_h < 1) || ($ratio_w > 1 && $ratio_h > 1)) {
  47. if($ratio_w < $ratio_h) {
  48. $ratio = $ratio_h ; // ?? 1, ?? ??? ?? ???? ??, ??? ?? ??? ?? ?? ratio Standard
  49. }else {
  50. $ratio = $ratio_w ;
  51. }
  52. // ???? ?? ?? ??? ??? ???? ?? ?? ???? ?????.
  53. $inter_w=(int)($ new_width / $ratio);
  54. $inter_h=(int) ($new_height / $ratio);
  55. $inter_img=imagecreatetruecolor($inter_w , $inter_h);
  56. //var_dump($inter_img);
  57. imagecopy($inter_img, $src_img, 0,0,0 ,0,$inter_w,$inter_h);
  58. // ?? ??? ???? ?? ? ??? ?? ?? ??? ?? $ratio
  59. // ? ??? ??
  60. $new_img=imagecreatetruecolor ($new_width,$new_height);
  61. //var_dump($new_img);exit();
  62. imagecopyresampled($new_img,$inter_img,0, 0,0,0,$new_width,$new_height,$inter_w ,$inter_h);
  63. switch($type) {
  64. case IMAGETYPE_JPEG :
  65. imagejpeg($new_img, $dst_file,100) // ??? ??
  66. break;
  67. ??? IMAGETYPE_PNG :
  68. imagepng($new_img,$dst_file,100);
  69. break;
  70. ??? IMAGETYPE_GIF :
  71. imagegif($new_img,$dst_file,100 );
  72. break;
  73. default:
  74. break;
  75. }
  76. } // end if 1
  77. // 2 ?? ???? ??? ?? ????? ??, ??? ?? ????? ????. ?? ?? ???? ??? ?? ?????.
  78. // =if( ($ratio_w < 1 && $ratio_h > 1) || ($ratio_w >1 && $ ratio_h <1) )
  79. else{
  80. $ratio=$ratio_h>$ratio_w? $ ratio_h : $ratio_w; //??? ? ? ?? ????.
  81. //??? ? ?? ???? ?????. ?? ??? ?? ???? ???? ?? ???? ?????
  82. $inter_w=(int) ($w * $ratio);
  83. $inter_h=(int) ($h * $ratio);
  84. $inter_img=imagecreatetruecolor($inter_w , $inter_h);
  85. //?? ??? ?? ?? ? ???
  86. imagecopyresampled($inter_img,$src_img,0,0,0,0,$inter_w,$inter_h, $w,$h);
  87. // ? ??? ??
  88. $new_img= imagecreatetruecolor($new_width,$new_height);
  89. imagecopy($new_img, $inter_img, 0,0,0,0, $new_width,$new_height);
  90. switch($type) {
  91. case IMAGETYPE_JPEG:
  92. imagejpeg($new_img, $dst_file,100); // ??? ??
  93. break;
  94. case IMAGETYPE_PNG :
  95. imagepng($new_img,$dst_file,100);
  96. break;
  97. case IMAGETYPE_GIF :
  98. imagegif($new_img,$dst_file,100);
  99. break;
  100. ???:
  101. ??;
  102. }
  103. }// if3
  104. }// ?? ??
  105. my_image_resize('test.gif','11111.gif','100px','100px');
  106. //?? ?? ????: http://www . pooy.net/phpphp.html
  107. ?>
?? ??


? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? 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