terryds Posted September 15, 2013 Share Posted September 15, 2013 Hi, i want know how to make a quick installation CMS .... I mean installing the CMS without editing the code... So, when i set the host, database username,password,and name into a variable in a php file... Can you tell me how to do that ? I wonder so much how MyBB CMS can do this... Link to comment Share on other sites More sharing options...
Lulzim Posted September 15, 2013 Share Posted September 15, 2013 Get the required information from a form, then generate php code and save it to a file. Something like this in your case: <?php$string = '<?php $db_host = "'. $_POST["db_host"]. '";$db_uname = "'. $_POST["db_uname"]. '";$db_pass = "'. $_POST["db_pass"]. '";$db_name = "'. $_POST["db_name"]. '";?>';$file = fopen("config.php", "w");fwrite($file, $string);fclose($file);?> 1 Link to comment Share on other sites More sharing options...
niche Posted September 15, 2013 Share Posted September 15, 2013 What's a specific example of what you need? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now