Ejemplo n.º 1
0
 public function __construct($width = 60, $height = 60, $codeNum = 4, $codeType = 3, $shapeType = 1, $fontTextShow = FALSE, $fontType = './Reluctance/Classes/Fonts/heiti.ttf', $imgOutType = 'gif')
 {
     self::$width = $width;
     self::$height = $height;
     self::$codeNum = $codeNum;
     self::$codeType = $codeType;
     self::$shapeType = $shapeType;
     self::$imgOutType = $imgOutType;
     self::$fontTextShow = $fontTextShow;
     if (!file_exists($fontType)) {
         $GLOBALS['debug'] = 1;
         Debug::addmsg('<font color="red">验证码字体路径不存在</font>');
     } else {
         self::$fontType = $fontType;
     }
     self::$img = imagecreatetruecolor($width, $height);
     self::$codeStringArray = self::getCodeString($codeType);
 }