This is my directory structure:

[![enter image description here](https://i.stack.imgur.com/bjLD8.jpg)](https://i.stack.imgur.com/bjLD8.jpg)

My code is the following:

```
$data['msg'] = $msg ;

$this->load->helper('captcha');

$captcha = array(
    'word' => rand(9999,99999),
    'img_path'  => './captcha/',
    'img_url'   => base_url().'/captcha/',
    'font_path' =>  './captcha/font.ttf',
    'img_width' => '130',
    'img_height'=> 50,
    'expiration'=> 5800
);

$cap = create_captcha($captcha);
$data['image'] = $cap['image'] ;
echo var_dump($cap);
return;

```

but my output returns `bool(false)`.