简体   繁体   中英

Codeigniter Class 'OAuth' not found in api in ci model

$key = $this->config->item('app_key_string');
    $secret= $this->config->item('app_secret');
    return $oauth = new OAuth($key, $secret);

An uncaught Exception was encountered Type: Error

Message: Class 'OAuth' not found

Filename: /home/rosesand/etsy.rosesandbows.com/application/models/Etsy_api.php

Line Number: 32

Backtrace:

File: /home/rosesand/etsy.rosesandbows.com/application/controllers/App.php Line: 35 Function: outh

File: /home/rosesand/etsy.rosesandbows.com/index.php Line: 315 Function: require_once

Have you added OAuth library to your model ? how have you added OAuth library to CI?

if every thing alright and you are using CI version more than 3 than you can rename the OAuth class file by capitalize first letter . i mean Like

Oauth.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM