万能php验证码类,供大家参考,具体内容如下
code.php是验证码类,类的名称最好和文件名的名称一样,这样有利于我们的查看。
code.php
<?php
header('Content-type:text/html;charset=utf8');
class Code{
// 验证码个数$number
protected $number;
// 验证码类型$codeType
protected $codeType;
// 验证码图像宽度$width
protected $width;
// 验证码$height
protected $height;