kunalvarma05 / dropbox-php-sdk

🔥📦 An Easy-to-Use PHP SDK to work with the Dropbox V2 API.
https://kunalvarma05.github.io/dropbox-php-sdk/
MIT License
363 stars 180 forks source link

Use this in codeigniter #106

Closed netdeveloper1job closed 3 years ago

netdeveloper1job commented 6 years ago

Hi can you please guide me how i call this api usi codeigniter framwork

marcus-at-localhost commented 6 years ago

There is plenty of information out there, how to include third-party libraries in Codeigniter. As a start: https://stackoverflow.com/questions/45009712/load-external-library-in-codeigniter

netdeveloper1job commented 6 years ago

classes are not load due to namespace. any alternate to use namespace in CI framework or any version of this library without namespace ?

netdeveloper1job commented 6 years ago

I also checked with removing namespaces from all files . But still I getting "Unable to locate the specified class: Session.php" in my controller.

raenk commented 6 years ago

With composer is pretty easy. Install the SDK with composer, make sure the autoload is set to TRUE in config.php and then set the namespaces before the class begins in your controller:

use Kunnu\Dropbox\Dropbox; use Kunnu\Dropbox\DropboxApp; use Kunnu\Dropbox\DropboxFile;