I’m not sure how to do this, I have a file which defines (and creates) the database, I want it to be run once (on installation) and not every time the index.php page is run, so what is the best way to do this do you think? I was thinking of deleting the file from index.php when the file (db_define.php) is run successfully.
Share
Usually you would instruct the person installing the software to run such a script manually as part of the installation procedure.
However, if you insist on having this done automatically, it might be smarter to just check if the DB exists, or if it is the correct version (according to the versioning stuff that you already have in place… you do have a DB version stored in the DB, right?) and not run the script in that case.