Welcome Guest, Not a member yet? Register   Sign In
Using a .yml (or other file) to dynamically assign config.php values
#3

(10-18-2018, 03:00 AM)InsiteFX Wrote: Codeigniter stops you from opening the file unless the BASEPATH is set from index.php

See the index.html file in the config folder look at it.

Honestly, did not think of that. I will need to put the file in a defined folder then. But even so, even if i make a XML file and load it in (arguably easier than a .yml), i still have to be able to generate that file from within a composer install/update command. As far as things are looking now, i'd have to write my own composer package that asks for the settings and generates a paramaters.xml for me, as i cannot find one that does that already.

Problem still is, that it is not recommended to have logic in the config.php, and sure i can write a controller that is called before the .xml is applied, and edits the config.php for me, but that still forces the developer to run the page at least once while it is not configured, and thatĀ feels like a step that can be avoided. Also, it does not make sense to do it this way for people who are used to CI.
Reply


Messages In This Thread
RE: Using a .yml (or other file) to dynamically assign config.php values - by DyingDutchman - 10-18-2018, 03:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB