Jump to content

Quick installation CMS


Recommended Posts

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

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);?>
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...