Welcome Guest, Not a member yet? Register   Sign In
Instaling External library help.
#1

[eluser]Unknown[/eluser]
Hello, everyone.
My name is Raimonds, and i just started to work with codeigniter, and it looks awesome, but i wanted to auto load API library (Most popular Latvian site API), but it failed. Here is the link to library code ( http://paste.php.lv/6386808a8b063a1adbc6...a?lang=php ). Can someone help me with saying what do i need to change there to use it with codeigniter, and auto load it?

Thank you with pleasure, Raimonds.

PS. I tried like this:
Code:
$params = array('app_id' => 11, 'app_key' => 'd6949661ccde33a65d98653043bc3119');
$this->load->library('DraugiemApi',$params);
echo $this->DraugiemApi->getAppUsers(1, 10);

But it returned error
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: Welcome::$Draugiem

Filename: controllers/welcome.php

Line Number: 16
Fatal error: Call to a member function getAppUsers() on a non-object in C:\AppServ\www\mini_ads\application\controllers\welcome.php on line 16
#2

[eluser]WanWizard[/eluser]
PHP variable names are case sensitive.

CodeIgniter creates everything in lowercase, do not use CamelCase in your application. (in this case, $this->draugiemapi is created).




Theme © iAndrew 2016 - Forum software by © MyBB