Welcome Guest, Not a member yet? Register   Sign In
Classmap not loaded?
#4

Hi, we discussed this in Codeigniter's slack channel yesterday. And the solution to this are:

PHP Code:
<?php namespace App\Controllers;

use \
Oauth;
// or use Oauth

class Home extends BaseController
{
    public function 
index()
    {
        
$oauth = new Oauth();
        echo 
$oauth->dance();
    }


If you are just specifying new Oauth() till will look in a relative path e.g. App\Controllers, as you are trying to access it from there. If you want it to load the global Oauth you will need to use "use Oauth" before making the class.
Reply


Messages In This Thread
Classmap not loaded? - by evansharp - 01-25-2020, 02:35 PM
RE: Classmap not loaded? - by ajmeireles - 02-13-2020, 10:56 AM
RE: Classmap not loaded? - by evansharp - 02-13-2020, 07:21 PM
RE: Classmap not loaded? - by jreklund - 02-14-2020, 12:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB