Welcome Guest, Not a member yet? Register   Sign In
Unload Database
#3

(This post was last modified: 12-17-2021, 05:22 AM by maui82.)

(12-16-2021, 09:50 PM)kenjis Wrote: Where did you load database?

it's hard to say because in CI3 I used to load libraries in the autoload.php file: 

Code:
$autoload['libraries'] = array('database', 'session', 'email');


But in CI4 (which I'm using now for the first time) the autoload.php file is slightly different and only contains the following lines (I cut the comments out):

Code:
<?php
namespace Config;
use CodeIgniter\Config\AutoloadConfig;

class Autoload extends AutoloadConfig
{
    public $psr4 = [
        APP_NAMESPACE => APPPATH, [i]// For custom app namespace[/i]
        'Config'      => APPPATH . 'Config',
    ];
    public $classmap = [];
}


I don't know exactly where the database is loaded (but it is, because everything works fine if I define an access in the .env file or in the /app/Config/Database.php)
Reply


Messages In This Thread
Unload Database - by maui82 - 12-16-2021, 01:06 PM
RE: Unload Database - by kenjis - 12-16-2021, 09:50 PM
RE: Unload Database - by maui82 - 12-17-2021, 05:21 AM
RE: Unload Database - by John_Betong - 12-17-2021, 05:38 AM
RE: Unload Database - by iRedds - 12-18-2021, 05:33 AM
RE: Unload Database - by maui82 - 01-17-2022, 09:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB