Welcome Guest, Not a member yet? Register   Sign In
url_helper error/bug

Hi everyone,

I am trying to use current_url() function on my localhost but getting this error below;

PHP Code:
Call to a member function uri_string() on null in /opt/lampp/htdocs/ci_3/system/helpers/url_helper.php on line 106 

I loaded the url helper with in config/autoload.php. segment() function also getting the same error. My php version is 5.6.12, so is that the reason of the problem? How can i fix this error?

Here is my controller and view files.

PHP Code:
class Home extends CI_Controller {


    public function 
$data['title'] = 'Test';

PHP Code:
<!DOCTYPE html>
html lang="en">
meta charset="UTF-8">
title><?php echo $title?></title>
    <h2>Hello World!</h2>
    <p><?php echo current_url(); ?></p>

We don't need the same threads posted twice ... http://forum.codeigniter.com/thread-63047.html
It won't help you, but will just confuse others.

Theme © iAndrew 2016 - Forum software by © MyBB