Mary
Mary

Reputation: 197

Verify email with codeigniter sending a codeigniter function

I did same as described in Verify email with codeigniter and all work seems ok from my side, but it only works when I give all the direction like: http://localhost/site_name/controller/function_name/parameter the parameter is my random code, but when I learn codeigniter it says that the links to a function we put in like this:

 echo site_url('controller/function_name/parameter')

When I do this, the link doesn't work.

Upvotes: 0

Views: 91

Answers (1)

Ferenc Kurucz
Ferenc Kurucz

Reputation: 142

It looks like you need to load the url helper in your code.

Either add it system wide in the file:

application/config/autoload.php

 $autoload['helper'] = array('url');

or you can define it in your controller:

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

But just in case please ensure that you have the base_url parameter set up in your appliation/config/config.php

$config['base_url'] = 'http://localhost/site_name/';

Upvotes: 2

Related Questions