1

I'm getting the Unable to load the requested class: url

my library code is :-Curl_lib.php

<?php class Curl_lib { function hello() { $CI = & get_instance(); $CI->load->library('url'); $msg = "Hello"; return $msg; } } ?> 

Controller code is:

<?php class Curl extends CI_Controller { function __construct() { parent::__construct(); $this->load->library('curl_lib'); $this->load->helper('url'); } function get_content() { $message = $this->curl_lib->hello(); echo $message; } } ?> 

1 Answer 1

3

Try it

Url is not Library. it is Helper class.

<?php class Curl_lib { function hello() { $CI = & get_instance(); $CI->load->helper('url'); $msg = "Hello"; return $msg; } } ?> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.