Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] problem including files in a library
#1

[eluser]mikegioia[/eluser]
hi guys -

i'm trying to set up the Dropbox PHP API in codeigniter and I'm running into issues with including the classes.

The structure is set up to be a folder called 'dropbox' in my libraries folder and a bunch of classes within them. all it says to include (which i do in the dropbox library file i made) this file called autoload.php.

Autoload.php just does this:

Code:
function Dropbox_autoload($className) {

    if(strpos($className,'Dropbox_')===0) {

        include dirname(__FILE__) . '/' . str_replace('_','/',substr($className,8)) . '.php';

    }

}

spl_autoload_register('Dropbox_autoload');


what does this do? when I try to load dropbox classes like in the examples i get Exceptions thrown saying classes not found: 'The OAuth class could not be found! Did you install and enable the oauth extension?' I've tried just including all of the class files directly in the constructor of the library I made.

Any help on this would be greatly appreciated!
Mike

***
Edit: Solved, this was an issue with not having oauth installed on the machine. Just for reference, if anyone has a similar problem please see here: http://djpate.com/2010/10/07/how-to-inst...on-ubuntu/

and if anyone would like the dropbox library I'm setting up, please comment below and I can make it available.


Messages In This Thread
[SOLVED] problem including files in a library - by El Forum - 01-17-2011, 07:11 AM
[SOLVED] problem including files in a library - by El Forum - 03-10-2011, 08:10 AM
[SOLVED] problem including files in a library - by El Forum - 07-15-2011, 12:59 PM
[SOLVED] problem including files in a library - by El Forum - 07-15-2011, 03:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB