1
因此,我不想在CI上使用secureimage coz'我不想使用默认的CAPTCHA助手,因为它没有音频选项,但是在使用secureimage时显示音频时出现问题。CodeIgniter中的SecureImage
我复制了从站点下载到CI库的整个secureimage文件夹。
显示图像很好,也检查输入的代码。但我的问题是显示音频文件。我不知道该怎么做。
这里是我所显示的图像,以及检查(已使用的secureimage库):
function captcha_image(){
$img = new Securimage();
return $img->show();
}
public function captcha_check(){
$img = new Securimage();
$input = $this->input->post('imagecode');
$result = $img->check($input);
if($result)
$message = "success";
else
$message = "try again";
}
我的观点:
<img src="<?php echo site_url('form/captcha_image') ?>" alt='captcha' />
我应该调用$ IMG在我的看法? –
@KairiSan你可以在控制器或视图中调用它,如果你从控制器传递它。 – Meabed
明白了! :) 谢谢 –