Welcome Guest, Not a member yet? Register   Sign In
New Install
#1

Hello,

I am new to Code Igniter. I'm developing a Content Management System. My question, is there a way to do a custom configuration.php file so that I don't have to share the ENV files or anything to make it easier for users to update their Database credentials? Also -- i'd like to build a custom index.php that goes into the app. I'm going to be using Ioncube to encrypt my files, so I want to make it rather easy to accomplish all this. The script I'll be using for Licensing actually is found here.

I'm new to the MVC type framework. Any guidance would be well appreciated!

Thank you Smile
Reply
#2

(This post was last modified: 05-17-2024, 02:52 AM by Bosborne.)

I believe if you look at the bottom if the App,php file in the Config folder, there are a couple of other custom env files referenced.

If you get it on sale, I strongly recommend this Udemy Codeigniter class. https://www.udemy.com/course/codeigniter...DERSALE24B

It is currently on sale and Udemy has sales quite often.
Reply
#3

It looks like I may be able to actually do away with the ENV files. Though the files like spark, I'm not so sure about. I've been doing things like this, especially with my App.php file

PHP Code:
public $baseURL;

    public function 
__construct()
    {
        
$this->baseURL 'http://' $_SERVER['HTTP_HOST'] . '/public';

        
// Include the external configuration file
        
$rootConfigPath ROOTDIR '/configuration.php';
        if (
file_exists($rootConfigPath)) {
            include 
$rootConfigPath;

            
// Set the appTimezone using the value from the configuration file
            
$this->appTimezone $timezone ?? 'UTC';
        } else {
            
$this->appTimezone 'UTC';
        }
        
$this->charset $charset ?? 'UTF-8';
    } 

I was able to make a License Library and put a LicenseVerification call in my BaseController. While my app will likely be closed source, I may see if there's files I could leave open so the app can be extended! I'll also give that Class a try as well!

Thank you Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB