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

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

PHP ?? ?? ?? ??

Jul 25, 2016 am 08:43 AM

  1. class ValidationCode
  2. {
  3. //屬性
  4. private $width;
  5. private $height;
  6. private $ codeNum;
  7. ??? $image;
  8. ??? $disturbColorNum; //干擾元素?cái)?shù)目
  9. private $checkCode;
  10. function __construct($width=80,$height=20,$codeNum=4)
  11. {
  12. $this->width=$width;
  13. $this->height=$height;
  14. $this->codeNum=$codeNum;
  15. $number=floor($width*$height/15);
  16. if($number> ;240-$codeNum)
  17. {
  18. $this->disturbColorNum=240-$codeNum;
  19. }else
  20. {
  21. $this->disturbColorNum=$number;
  22. }
  23. $this->checkCode=$this->createCheckcode();
  24. }
  25. function getCheckCode()
  26. {
  27. return $this->checkCode;
  28. }
  29. ??? ?? createImage(){
  30. $this->image=imagecreatetruecolor($this->width,$this->height);
  31. $backcolor=imagecolorallocate($this->image ,rand(225,255),rand(225,255),rand(255,255));
  32. imagefill($this->image,0,0,$backcolor);
  33. $border=imagecolorallocate($this-> image,0,0,0);
  34. imageRectangle($this->image,0,0,$this->width-1,$this->height-1,$border);
  35. }
  36. ??? ?? setDisturbColor(){
  37. for($i=0;$i<$this->disturbColorNum;$i ){
  38. $color=imagecolorallocate($this->image,rand (0,255),rand(0,255),rand(0,255));
  39. imagesetpixel($this->image,rand(1,$this->width-2),rand(1,$this-> height-2),$color);
  40. }
  41. for($i=0;$i<10;$i )
  42. {
  43. $color=imagecolorallocate($this->image, rand(0,255),rand(0,255),rand(0,255));
  44. imagearc($this->image,rand(-10,$this->width),rand(-10,$this-> ;height),rand(30,300),rand(20,300),55,44,$color);
  45. }
  46. }
  47. ??? ?? outputText($fontFace=""){
  48. for($ i=0;$i<$this->codeNum;$i )
  49. {
  50. $fontcolor=imagecolorallocate($this->image,rand(0,128),rand(0,128),rand(0,128) );
  51. if($fontFace=="")
  52. {
  53. $fontsize=rand(3,5);
  54. $x=floor($this->width/$this-> ;codeNum)*$i 5;
  55. $y=rand(0,$this->height-15);
  56. imagechar($this->image,$fontsize,$x,$y,$ this->checkCode{$i},$fontcolor);
  57. }
  58. else
  59. {
  60. $fontsize=rand(12,16);
  61. $x=floor(($this ->width-8)/$this->codeNum)*$i 8;
  62. $y=rand($fontsize,$this->height-8);
  63. imagettftext($this-> ;image,$fontsize,rand(-45,45),$x,$y,$fontcolor,$fontFace,$this->checkCode{$i});
  64. }
  65. }
  66. }
  67. ??? ?? createCheckCode(){
  68. $code="23456789abcdefghijkmnpqrstuvwrst";
  69. $str="";
  70. for($i=0;$i<$this->codeNum ;$i )
  71. {
  72. $char=$code{rand(0,strlen($code)-1)};
  73. $str.=$char;
  74. }
  75. $ ?? str;
  76. }
  77. ??? ?? outputImage()
  78. {
  79. if(imagetypes()&IMG_GIF)
  80. {
  81. header("Content-Type:image/gif");
  82. imagepng($this->image);
  83. }else if(imagetypes()&IMG_JPG)
  84. {
  85. header("Content-Type:image/jpeg");
  86. imagepng($this ->image);
  87. }else if(imagetypes()&IMG_PNG)
  88. {
  89. header("Content-Type:image/png");
  90. imagepng($this->image) ;
  91. }else if(imagetypes()&IMG_WBMP){
  92. header("Content-Type:image/vnd.wap.wbmp");
  93. imagepng($this->image);
  94. }else
  95. {
  96. die("PHP不支持圖文驗(yàn)證碼");
  97. }
  98. }
  99. //??過(guò)該方法向?yàn)g覽器輸?圖???
  100. function showImage($fontFace ="")
  101. {
  102. //創(chuàng)建圖image背景
  103. $this->createImage();
  104. //設(shè)置干擾元素
  105. $this->setDisturbColor();
  106. //向圖 Image中隨機(jī)畫(huà)???
  107. $this->outputText($fontFace);
  108. //輸ude圖image
  109. $this->outputImage();
  110. }
  111. function __destruct()
  112. {
  113. imagedestroy($this->image);
  114. }
  115. }
  116. function checklogin(){
  117. if(empty( $_POST['name']))
  118. die('??? ??? ??? ? ????.');
  119. if(empty($_POST['password']))
  120. die("????? ??? ? ????." ) ;
  121. if($_SESSION['code']!=$_POST['vertify'])
  122. die("???? ??? ???????.".$_SESSION['code']);
  123. $username=$_POST['name'];
  124. $password=md5($_POST['password']);
  125. //????? ??
  126. conndb($username,$password) ;
  127. }
  128. ?? conndb($name="",$ps=""){
  129. $conn=mysql_connect('localhost','root','123456');
  130. if( ! $conn) die("?????? ?? ??".mysql_error());
  131. mysql_select_db('5kan',$conn) ?? die('?????? ?? ??'.mysql_error());
  132. mysql_set_charset('utf8 ' ,$conn);
  133. $sql="??? ??='{$name}' ? ????='{$ps}'"? k_user?? ID ??;
  134. $result=mysql_query($sql) ?? ?? ( "SQL ? ??".mysql_error());
  135. if(mysql_num_rows($result)>0) die("??? ??");
  136. else die("??? ?? ?? ????? ???????.");
  137. mysql_close($conn);
  138. }
  139. session_start();
  140. if(!isset($_POST['randnum']))
  141. {
  142. $code=new ValidationCode(120, 20,4);
  143. $code->showImage("comicbd.ttf"); //???? ??
  144. $_SESSION['code']=$code->getCheckCode();//?? ????
  145. }
  146. else
  147. {
  148. checklogin();
  149. }
  150. ?>
?? ??

????, php


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

???

??? ??

??? ????
1601
29
PHP ????
1502
276
???
PHP ?? ??? ??????? PHP ?? ??? ??????? Jul 17, 2025 am 04:16 AM

PHP ?? ??? ?? ???? ?? ? ????? ??? ?????. 1. ?? ??? ??? ??? ??? ? ? ??? ??? ??? ?? ?? ??? ???? ???????. 2. ?? ??? ???? ???? ? ?? ????? ?? ?? ?? ??? ?????. 3. $ _get ? $ _post? ?? Hyperglobal ??? ?? ???? ?? ??? ? ??? ??? ??????? ???????. 4. ?? ?? ?? ???? ?? ?? ?? ??? ?????? ?? ??? ??? ?? ??? ???????. ??? ??? ????? ??? ??? ?? ???? ????? ? ??? ? ? ????.

PHP?? ?? ???? ???? ???? ??? ?????? PHP?? ?? ???? ???? ???? ??? ?????? Jul 08, 2025 am 02:37 AM

PHP ?? ???? ???? ????? ?? ? ??? ???? ?? ?? ? ??? ???? ?? ??? ?????? ??? ??? ? ? ???????. 1. ??? ?? CSRF? ???? ?? ??? ??? ???? ?????? ??? ???? FINFO_FILE? ?? ?? MIME ??? ?????. 2. ??? ??? ??? ???? ??? ?? ??? ?? ? WEB ????? ??? ???? ??????. 3. PHP ?? ??? ?? ? ?? ???? NGINX/APACHE? ??? ????? ?? ???? ?????. 4. GD ?????? ??? ? ?? ???? ??? ?? ??? ?? ????.

PHP?? ?? ?? PHP?? ?? ?? Jul 18, 2025 am 04:57 AM

PHP ?? ???? ? ?? ???? ??? ????. 1. // ?? #? ???? ? ?? ??? ???? // ???? ?? ????. 2. ?? /.../ ?? ?? ?? ??? ????? ?? ? ?? ??? ?? ? ? ????. 3. ?? ?? ?? / if () {} /? ?? ?? ??? ????? ??? ?? ?? ?? ??? ???? ????? ???? ??? ?? ???? ???? ??? ? ??? ??????.

PHP?? ???? ??? ?????? PHP?? ???? ??? ?????? Jul 11, 2025 am 03:12 AM

Ageneratorinphpisamemory- ???? Way-Erate-Overgedatasetsetsbaluesoneatimeatimeatimeatimallatonce.1.generatorsuseTheyieldKeywordTocroadtOpvaluesondemand, RetingMemoryUsage.2

PHP ?? ?? ? PHP ?? ?? ? Jul 18, 2025 am 04:51 AM

PHP ??? ???? ??? ??? ??? ????? ????. ??? ????? ?? ???? ??? "?? ? ?"??? "?"? ???????. 1. ??? ? ??? ??? DocBlock (/*/)? ?? ?? ??? ???? ??? ? ?? ???? ??????. 2. JS ??? ???? ?? ???? ??? ?? ??? ??? ?????. 3. ??? ?? ?? ?? ??? ???? ????? ????? ???? ?? ????? ???? ? ??????. 4. Todo ? Fixme? ????? ???? ? ? ??? ??? ???? ?? ?? ? ??? ???????. ??? ???? ?? ??? ??? ?? ?? ?? ???? ???? ? ????.

?? PHP : ??? ??? ?? PHP : ??? ??? Jul 18, 2025 am 04:54 AM

tolearnpheffectical, startBysetTupaloCalserErverEnmentUsingToolslikexamppandacodeeditor -likevscode.1) installxamppforapache, mysql, andphp.2) useacodeeditorforsyntaxsupport.3)) 3) testimplephpfile.next, withpluclucincludechlucincluclucludechluclucled

PHP?? ??? ? ???? ??? ????? ?? PHP?? ??? ? ???? ??? ????? ?? Jul 12, 2025 am 03:15 AM

PHP??? ???? ??? ?? ?? ????? ???? ??? ?? ??? ??? ?? ? ??? ??? ???? ?????. ???? 0?? ???? ?? ??? ???? ? ?? ???? ?? ?? ? ? ????. MB_SUBSTR? ?? ??? ??? ???????. ? : $ str = "hello"; echo $ str [0]; ?? H; ??? MB_SUBSTR ($ str, 1,1)? ?? ??? ??? ??? ??????. ?? ???????? ???? ??? ???? ?? ???? ?? ?? ???? ?????? ??? ????? ?? ??? ?? ??? ???? ???? ?? ????.

?? PHP ?? ??? ?? PHP ?? ??? Jul 18, 2025 am 04:52 AM

toinstallphpquickly, usexampponwindowsorhomebrewonmacos.1. ??, downloadandinstallxAmpp, selectComponents, startApache ? placefilesinhtdocs.2

See all articles