用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2778|回复: 3
收起左侧

[HELP] 来请教一个验证码的问题???BUG?

[复制链接]
发表于 2012-4-2 20:13:48 | 显示全部楼层 |阅读模式
先上代码:
PHP复制代码
        function index(){       $i      =       rand(1000,9999);
        $vals = array(
            'img_path' => './uploads/captcha/',
                'img_url' => '/uploads/captcha/',
                'word' => $i,
                'img_width' => '70',
            'img_height' => '21',
            'expiration' => '720',
            );
        $cap = create_captcha($vals);
 
        $data = array(
            'captcha_time' => time(),
            'ip_address' => $this->input->ip_address(),
            'word'              =>      $cap['word'],
            );
 
        $query = $this->db->insert_string('captcha', $data);
        $this->db->query($query);
        echo   $cap['image'];
        }
复制代码


再来看效果:

四位的验证码,跑外面去了。。。囧
请各位指教
 楼主| 发表于 2012-4-5 10:29:57 | 显示全部楼层
没人知道?没人遇到?莫非是不屑?
发表于 2013-10-23 09:11:33 | 显示全部楼层
o熊小猫o 发表于 2012-4-5 10:29
没人知道?没人遇到?莫非是不屑?

我也正在想办法解决这个问题呢

发表于 2013-10-23 09:29:31 | 显示全部楼层
加宽image到150试试~

本版积分规则