Friday, June 27, 2014

Adopt PHP Library in Codeigniter

Adopt PHP Library:

1. Create a test folder in it:

/application/libraries/test_folder/

2. Create a Test_lib.php in the libraries root with the content:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require_once 'facebook/facebook.php';

class Facebook_lib extends Facebook{
}



3. In controller:

$this->load->library('facebook_lib',$config); 

$this->facebook_lib->clearAllPersistentData();




No comments:

Post a Comment