Welcome Guest, Not a member yet? Register   Sign In
Call file / class from ThirdParty folder
#2

That's the correct way to call it, so you probably don't have it loaded. Read up on autoloading if you'd like the framework to handle it for you:
https://codeigniter4.github.io/userguide...oader.html

For example, if you wanted to use your code above, app/Config/Autoload.php might look like this:


PHP Code:
$psr4 = [
    
'Config'      => APPPATH 'Config',
    
APP_NAMESPACE => APPPATH,                // For custom namespace
    
'App'         => APPPATH,                // To ensure filters, etc still found,
    
'TP\Tools'    => APPPATH 'ThirdParty/TpTools',
]; 

(You might want to use the classmap instead, depending on what the library looks like.)
Reply


Messages In This Thread
RE: Call file / class from ThirdParty folder - by MGatner - 11-22-2019, 07:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB