Question

Theoretically: You have a cms and an install.php to that. You want to run the install.php first, and at the end of the steps that would generate and save an index.php before it's deleting itself.

The steps of the install.php:

  1. lincense agreement
  2. php,mysql version check
  3. saving mysql.php
  4. saving index.php, deleting install.php, header location:index.php

My question is: How to run install.php automatically when you go to your web page? (Like wordpress' famous 5-minute installation.)

I know that i shouldn't use an installer like this, but it's my homework.

Was it helpful?

Solution

In your .htaccess , write-

DirectoryIndex install.php index3.php index4.php default.htm

where install.php index3.php index4.php default.htm are general other pages of your directive, by default index2.php gets loaded, if its not present index3.php gets loaded and so on.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top