php?生成验证码
程序员文章站
2022-05-07 20:29:55
...
哪位大哥分享下代码
回复讨论(解决方案)
session_start();$dict = str_split('abcdefghijklmnopqrstuv0123456789');shuffle($dict);$_SESSION['word'] = join('', array_slice($dict, -4));$im = imagecreate(100, 30);$bg = imagecolorallocate($im, 255, 255, 255);$char = imagecolorallocate($im, 0, 0, 0);imagestring($im, 5, 10, 10, $_SESSION['word'], $char);imagegif($im);
你想要什么样的验证码?
你看看这里吧,可能会对你有所帮助
http://blog.csdn.net/whq19890827/article/details/41778961
session_start(); $checkCode=""; for($i=0;$i