Welcome Guest, Not a member yet? Register   Sign In
How to change data from php to config file
#3
Thumbs Up 
(This post was last modified: 02-19-2020, 10:53 AM by Kakumi.)

(02-19-2020, 07:50 AM)InsiteFX Wrote: You could make a config template with replaceable parameters and then do a str_replace on them
when finished just move the template to the config folder.

You could also do that for the database config.

Thanks, i think i got the idea.
Like that ?

PHP Code:
$configText file_get_contents("writable/template/Config.php");
$configText str_replace("{someVar}"$userInput$configText);

file_put_contents("Config/CustomConfig.php"$configText); 
Reply


Messages In This Thread
RE: How to change data from php to config file - by Kakumi - 02-19-2020, 08:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB