Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

Captcha Not working

$
0
0
Hi, i'm trying to generate a Captcha image but it is not showing.
The following is my function -it is just a copy and edit of CI's documentation:
PHP Code:
    public function captcha_create()
    {
        
$this->load->helper('captcha');

        
$vals = array(
     
       'img_path'      => FCPATH.'captcha/',
     
       'img_url'       => base_url('captcha/'),
     
       'img_width'     => '150',
     
       'img_height'    => 30,
     
       'expiration'    => 1800,
     
       'word_length'   => 8,
     
       'font_size'     => 16,
     
       'img_id'        => 'Imageid',
     
       'pool'          => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',

     
       // White background and border, black text and red grid
     
       'colors'        => array(
     
               'background' => array(255255255),
     
               'border' => array(255255255),
     
               'text' => array(1602855),
     
               'grid' => array(28160133)
     
       )

     
    );

         
$cap create_captcha($vals);
         echo 
$cap['image'];

    } 
I am on a local server and have the GD library installed -- am using XAMMP.
What could I have missed?

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>