Welcome Guest, Not a member yet? Register   Sign In
Modules not loading config files
#4

(This post was last modified: 03-20-2021, 11:45 AM by InsiteFX.)

Modules do not autoload the config files in them you have to load them.

If you need constants then add them in the app/Common.php then they will be there.

And here is the way I tested it.

app/Common.php
PHP Code:
<?php

/**
 * The goal of this file is to allow developers a location
 * where they can overwrite core procedural functions and
 * replace them with their own. This file is loaded during
 * the bootstrap process and is called during the frameworks
 * execution.
 *
 * This can be looked at as a `master helper` file that is
 * loaded early on, and may also contain additional functions
 * that you'd like to use throughout your entire application
 *
 * @link: https://codeigniter4.github.io/CodeIgniter4/
 */

/**
 * My Defined Constants
 * -----------------------------------------------------------------------
 * Test
 */
defined('APP_TEST') || define('APP_TEST''Test'); 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Modules not loading config files - by ZoeF - 03-19-2021, 12:42 PM
RE: Modules not loading config files - by kenjis - 03-19-2021, 06:44 PM
RE: Modules not loading config files - by ZoeF - 03-19-2021, 08:13 PM
RE: Modules not loading config files - by InsiteFX - 03-20-2021, 04:00 AM
RE: Modules not loading config files - by ZoeF - 03-20-2021, 02:05 PM
RE: Modules not loading config files - by kenjis - 03-20-2021, 05:55 PM
RE: Modules not loading config files - by ZoeF - 03-20-2021, 06:01 PM
RE: Modules not loading config files - by ZoeF - 03-21-2021, 07:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB