declare base_url inside class variable codeigniter code example Example: codeigniter base_url $this->load->helper('url');