codeigniter를 사용 중입니다. 내 양식에 captcha를 사용하고 있습니다. 모두 괜찮 았는데,하지만 지금은 내가 불을 지르고에서 확인할 때,로드되지 않은이 오류가오류 captcha 사용시 '이미지가 손상되거나 잘 렸습니다.'
Image corrupt or truncated: http://localhost/elephanti//home/auth/get_capture/913472
를 제공 이것은 내보기에 내 aut_lib에서
<div
class="form-item">
<div class="catergory-inputs">
<div class="textarea-large-container" id="caption">
<img border="0"
src="<?php echo $this->config->item('base_url'); ?>/home/auth/get_capture/<?php echo rand();?>"
id="captcha" width="225" height="67" />
</div>
<div class="caption-icon">
<img
src="<?php echo $this->config->item('img_path') ?>/icon-caption.png"
width="19" height="20" alt="icon-caption"
style="cursor: pointer;"
onclick="reload_chaptca('<?php echo $this->config->item('base_url'); ?>/home/auth/get_capture/','<?php echo rand();?>')" />
</div>
</div>
</div>
내 컨트롤러
function get_capture() {
$this->auth_lib->get_capture_image();
}
입니다
public function get_capture_image()
{
$this->ci->load->model('captcha/captcha_model');
$path = APPPATH . '../../assets/3rd/captcha';
$this->ci->captcha_model->lmj_crate_image($path);
}
thi 의 내 보안 문자 모델
공공 기능 lmj_crate_image ($ 경로) {
$this->resourcesPath=$path;
$ini = microtime(true);
/** Initialization */
$this->lmj_reserved_image();
/** Text insertion */
$text = $this->lmj_get_the_captcha();
$fontcfg = $this->fonts[array_rand($this->fonts)];
$this->lmj_write_fonts($text, $fontcfg);
$this->session->set_userdata($this->session_var, $text);
// $_SESSION[$this->session_var] = $text;
/** Transformations */
$this->lmj_render_image();
if ($this->blur && function_exists('imagefilter')) {
imagefilter($this->im, IMG_FILTER_GAUSSIAN_BLUR);
}
$this->lmj_low_resalution();
if ($this->debug) {
imagestring($this->im, 1, 1, $this->height - 8,
"$text {$fontcfg['font']} " . round((microtime(true) - $ini) * 1000) . "ms",
$this->GdFgColor
);
}
/** Output */
$this->lmj_make_image_from_text();
$this->lmj_default_clean();
}
내가 문제가 여기에 무엇을 알아낼 수 없습니다입니다. 이 코드는 도움이되지 않을 수 있습니다.
도움이되지 않으면 가능한 이유를 말해 주실 수 있습니다. 감사합니다 ...........