write a configuration file dynamically |
[eluser]sakcret[/eluser]
I need to write a configuration file dynamically, the file will create the folder config / miarchivoconfiguracion.php, define periods in the example: Code: $ config ['fecha_periodo_inicio'] = '2012-01-01 '; try $ this-> set_item ('fecha_periodo_inicio', '2012-02-01 '); apparently does not work because not physically writes the file anyone know how to do please hel me thanks...
[eluser]LonelyWolf[/eluser]
Seems a stupid question, but CI has write access to that folder?
[eluser]TWP Marketing[/eluser]
If this information is changing frequently, or changing at all, put it into a control file record and simply write to your database.
[eluser]InsiteFX[/eluser]
I just got done answering this in another topic. CI does not save the values to the config file they are temporary value.
[eluser]sakcret[/eluser]
Thanks all, I found that only changes the value for the current request does not write the configuration file, I was confused because the manual says you can change set_item ('something', 'something'); currently use MAMP and sometimes I have trouble with it is handled by the compiled application, it was just a question I forgive you again with the framework, what I did was Code: function cambiaPeriodo() { Sorry LonelyWolf stop by sometimes little things but ultimately affect greetings...
[eluser]CroNiX[/eluser]
[quote author="ribe" date="1344885719"]Obviously, User Guide should mention that.[/quote]Why should it mention what it doesn't do? Most docs I've ever read state what it WILL do and assume if it doesn't say it can do it that it can't.
[eluser]sakcret[/eluser]
I'm sorry you're right CroNiX needed a quick fix as it is for my school project, sorry could not assume that i need document myself CI thanks...
[eluser]timmahoney[/eluser]
Hi All I had a need for this a while ago, and made something to accommodate it. When I came across this post, I dug it up and put it on github. CodeIgniter Dynamic System Configuration Let me know what you think! |
Welcome Guest, Not a member yet? Register Sign In |