Here is my code of captcha.php.I am new to codeigniter so please help me out. I want to display the captcha image in the browser but the image is not getting displayed over there. Can anyone tell me where i doing wrong.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Captcha extends CI_Controller{
public function index(){
echo "HELLO CAPTCHA <br>";
$this->load->helper('captcha');
$val = array(
'word' => 'Random 123',
'img_path' => './Code__Igniter/application/captcha/',
'img_url' => 'http://localhost/Code__Igniter/index.php/captcha/',
'font_path' => './Code__Igniter/system/fonts/texb.ttf',
'img_width' => '300',
'img_height' => '50',
'expiration' => '3600',
);
$img = create_captcha($val);
echo $img['time'];
echo $img['word'];
$data['imag'] = $img['image'];
$this->load->view('header_view');
$this->load->view('main_view',$data);
}
}