Jul*_*rts 3 php captcha codeigniter
这个错误是什么?我如何解决它?
我使用codeigniter.
A Database Error Occurred
Error Number: 1048
Column 'captcha_time' cannot be null
INSERT INTO `captcha` (`captcha_time`, `ip_address`, `word`) VALUES (NULL, '31.57.141.7', NULL)
Filename: /home/324/public_html/123/models/login_model.php
Line Number: 79
Run Code Online (Sandbox Code Playgroud)
第79行:
function create_captcha()
{
$vals = array(
'img_path' => './captcha/',
'img_url' => 'captcha/',
);
$cap = create_captcha($vals);
$data = array(
'captcha_time' => $cap['time'],
'ip_address' => $this->input->ip_address(),
'word' => $cap['word']
);
$query = $this->db->insert_string('captcha', $data);
$this->db->query($query); // this line 79
}
Run Code Online (Sandbox Code Playgroud)
您收到此错误,因为文件夹"/ captcha"不在您的服务器上或设置了错误的权限.
如果图像路径不存在,或者不可写,则create_captcha()函数返回false,请查看验证码助手.