我在codeigniter(3.0)中有助手验证码问题。 验证码的工作不错,但在日志是:Codeigniter 3.0验证码404
ERROR - 2016-09-22 08:32:25 --> 404 Page Not Found: [207.46.XXX.XXX] > /upload/captcha/1470072358.0468.jpg
,每天为约100个错误。
问题在哪里?
我的控制器:
$random_number = substr(number_format(time() * rand(), 0, '', ''), 0, 6);
// setting up captcha config
$vals = array(
'word' => $random_number,
'img_path' => './upload/captcha/',
'img_url' => base_url() . 'upload/captcha/',
'img_width' => 140,
'img_height' => 32,
'expiration' => 7200,
'pool' => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
'colors' => array(
'background' => array(255, 255, 255),
'border' => array(255, 255, 255),
'text' => array(111, 34, 45),
'grid' => array(255, 40, 40),
),
'font_path' => base_url() . 'system/fonts/texb.ttf',
);
$data = array();
$data['captcha'] = create_captcha($vals);
$this->session->set_userdata('captchaWord', $data['captcha']['word']);
$this->view_data['captcha'] = create_captcha($vals);
你有上传文件夹..你可以改变IMAGE_PATH为'FCPATH.'upload /验证码/''这样 – Sundar
我尝试是一样的... –