我在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
我嘗試是一樣的... –