Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Codeigniter中的验证码大小写敏感性_Codeigniter_Captcha - Fatal编程技术网

Codeigniter中的验证码大小写敏感性

Codeigniter中的验证码大小写敏感性,codeigniter,captcha,Codeigniter,Captcha,如何设置大写的验证码。除了codeigniter之外,他们对验证码还有什么帮助。真正简单的解决方法是使用一种完全大写的字体 你可以从网上找到这样的字体,花几美元购买一个网络许可证,然后得到你喜欢的字体 搜索“所有大写”或类似内容 或者,你可以在网上搜索并找到一种免费字体 这比尝试侵入CodeIgniter验证码助手更容易。要创建带有大写字符的验证码,您需要执行以下操作: $vals = array( 'word' => strtoupper('Random word'), // H

如何设置大写的验证码。除了codeigniter之外,他们对验证码还有什么帮助。

真正简单的解决方法是使用一种完全大写的字体

你可以从网上找到这样的字体,花几美元购买一个网络许可证,然后得到你喜欢的字体

搜索“所有大写”或类似内容

或者,你可以在网上搜索并找到一种免费字体


这比尝试侵入CodeIgniter验证码助手更容易。

要创建带有大写字符的验证码,您需要执行以下操作:

$vals = array(
    'word' => strtoupper('Random word'), // Here is where the captcha code is converted to uppercase
    'img_path' => './captcha/',
    'img_url' => 'http://example.com/captcha/',
    'font_path' => './path/to/fonts/texb.ttf',
    'img_width' => '150',
    'img_height' => 30,
    'expiration' => 7200
    );

$cap = create_captcha($vals);
echo $cap['image'];

当然,您可能需要在检查时检查SQL,并让它检查数据库中随机单词的大写版本。

一种方法是将captcha表中captcha单词字段的排序规则更改为latin1\u general\u cs

Thorpe Obazee:谢谢你提醒我php中的strtoupper函数。我忘了Marc Audet:谢谢你给我看字体网站