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

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

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

Jul 25, 2016 am 09:04 AM

  1. /**
  2. * 通用PHP ?? ?? ??? PHP ?? ??類 img.php
  3. * 版本:V0.1
  4. * bbs.it-home.org 2013/3/1
  5. */
  6. class ValidateCode {
  7. private $charset="abcdefghizklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; //隨機(jī)因子
  8. private $code; //PHP ?? ?? ??? PHP ?? ??文字
  9. private $codelen=4; //PHP ?? ?? ??? PHP ?? ??顯示幾個(gè)文字
  10. private $width=130; //PHP ?? ?? ??? PHP ?? ??寬度
  11. private $height=50; //PHP ?? ?? ??? PHP ?? ??高度
  12. private $img; //PHP ?? ?? ??? PHP ?? ??資源句柄
  13. private $font; //指定的字體
  14. private $fontsize=20; //指定的字體大小
  15. private $fontcolor; //字體顏色 隨機(jī)
  16. //構(gòu)造類 編寫字體
  17. public function __construct(){
  18. $this->font=ROOT_PATH.'/font/elephant.ttf';
  19. }
  20. //創(chuàng)建4個(gè)隨機(jī)碼
  21. private function createCode(){
  22. $_leng=strlen($this->charset);
  23. for($i=1;$icodelen;$i ){
  24. $this->code.=$this->charset[mt_rand(0,$_leng)];
  25. }
  26. return $this->code;
  27. }
  28. //創(chuàng)建背景
  29. private function createBg(){
  30. //創(chuàng)建畫布 給一個(gè)資源jubing
  31. $this->img=imagecreatetruecolor($this->width,$this->height);
  32. //背景顏色
  33. $color=imagecolorallocate($this->img,mt_rand(157,255),mt_rand(157,255),mt_rand(157,255));
  34. //畫出一個(gè)矩形
  35. imagefilledrectangle($this->img,0,$this->height,$this->width,0,$color);
  36. }
  37. //創(chuàng)建字體
  38. private function createFont(){
  39. $_x=($this->width / $this->codelen); //字體長度
  40. for ($i=0;$icodelen;$i ){
  41. //文字顏色
  42. $color=imagecolorallocate($this->img,mt_rand(0,156),mt_rand(0,156),mt_rand(0,156));
  43. //資源句柄 字體大小 傾斜度 字體長度 字體高度 字體顏色 字體 具體文本
  44. imagettftext($this->img,$this->fontsize,mt_rand(-30,30),$_x*$i mt_rand(1,5),$this->height/1.4,$color,$this->font,$this->code[$i]);
  45. }
  46. }
  47. //隨機(jī)線條
  48. private function createLine(){
  49. //隨機(jī)線條
  50. for ($i=0;$i $color = imagecolorallocate($this->img,mt_rand(0,156),mt_rand(0,156),mt_rand(0,156));
  51. imageline($this->img,mt_rand(0,$this->width),mt_rand(0,$this->height),mt_rand(0,$this->width),mt_rand(0,$this->height),$color);
  52. }
  53. //隨機(jī)雪花
  54. for ($i=0;$i $color = imagecolorallocate($this->img,mt_rand(220,255),mt_rand(220,255),mt_rand(220,255));
  55. imagestring($this->img,mt_rand(1,5),mt_rand(0,$this->width),mt_rand(0,$this->height),'*',$color);
  56. }
  57. }
  58. //輸出背景
  59. private function outPut(){
  60. //生成標(biāo)頭
  61. header('ContentType:img/png');
  62. //輸出圖片
  63. imagepng($this->img);
  64. //銷毀結(jié)果集
  65. imagedestroy($this->img);
  66. }
  67. //對(duì)外輸出
  68. public function doimg(){
  69. //加載背景
  70. $this->createBg();
  71. //加載文件
  72. $this->createCode();
  73. //加載線條
  74. $this->createLine();
  75. //加載字體
  76. $this->createFont();
  77. //加載背景
  78. $this->outPut();
  79. }
  80. //獲取PHP ?? ?? ??? PHP ?? ??
  81. public function getCode(){
  82. return strtolower($this->code);
  83. }
  84. }
  85. ?>
復(fù)制代碼

調(diào)用示例:index.php PHP ?? ?? ??? PHP ?? ?? 為大家推薦幾篇有關(guān)phpPHP ?? ?? ??? PHP ?? ??的文章: php隨機(jī)PHP ?? ?? ??? PHP ?? ?? php生成隨機(jī)PHP ?? ?? ??? PHP ?? ??(圖文) 用php生成帶有雪花背景的PHP ?? ?? ??? PHP ?? ?? php寫的一個(gè)PHP ?? ?? ??? PHP ?? ?? php生成動(dòng)態(tài)圖片PHP ?? ?? ??? 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 18, 2025 am 04:51 AM

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

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

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

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