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
明白了! :) 謝謝 –