• 实例化类,然后调用类run()方法,即可生成默认的验证码图片,验证码图片是根据.ttf的字体文件生成的,所以必须要有字体文件,字体文件和类同级目录,要更改默认设置可以实例化类是传入参数、值的数组。调用getVerifyCode()方法会返回生成的验证码字符串。修改字体在219行。<?php class MyCaptchaAction {     /**     * @var integer the width of the generated CAPTCHA image. Defaults to 120.     * 图片宽度,默认120     */     public $width = 120;     /**     * @var integer the heig...
     发布日期: 2013-04-22    分类: PHP    浏览量: 4931   0条评论