Codeigniter captcha file name


Codeigniter captcha file name

我正在本地主机环境中的codeigniter中开发一个应用程序。

我正在使用captcha助手。它在captcha文件夹中创建一个临时captcha图像,例如一个图像名称:1458602120.1544.jpg.

今天我转到了digitalocean并安装了lampp,现在它创建了带有逗号而非句点的captcha图像,例如图像名称:1458602150144.jpg.

由于逗号字符的原因,在captcha数据库表中插入不起作用。

Column count doesn't match value count at row 1
INSERT INTO `captcha` (`captcha_time`, `ip_address`, `word`) VALUES (1458658443,4301, 'XX.XXX.XX.XXX', 'kWlPqs')

你知道如何解决我的问题吗?

我通过在以下行更改系统帮助程序文件来解决问题:

captcha_helper.php:307captcha_helper.php:315

带有:

$img_name = str_replace(',', '.', $now).'.jpg';
ImageJPEG($im, $img_path.$img_name);
$img = "<img src='"$img_url$img_name'" width='"$img_width'" height='"$img_height'" style='"border:0;'" alt='" '" />";
ImageDestroy($im);
return array('word' => $word, 'time' => str_replace(',', '.', $now), 'image' => $img);

我为变量$now添加了str_replace