creating a install.php feature.
Moderator: General Moderators
creating a install.php feature.
I have made a hit counter script but I would like a client to be able to download it upload it and run install.php. They then fill in a form with mysql address password etc, and a config.php file is created with all this information for the script to use, the script then creates tables in the database and then self combusts (deletes its self) how can I go about doing this?d
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
This takes a little familiarity with sql (or the ability to read the sql queries from phpMyAdmin or whatver database management system you use), but just make your install.php chmod a folder/file for you to create the config.php, print all of the information you want to be in there to the file, and then create the database table(s) through sql queries.
Ensure you have a lot of error reports for your user in case they make typos.
And I haven't see an installation script delete itself before... I think it's a bad idea because what if they want to reinstall/repair after making a small mistake, and aren't familiar with php?
Just make sure that you have a notice for them to delete it after use.
Ensure you have a lot of error reports for your user in case they make typos.
And I haven't see an installation script delete itself before... I think it's a bad idea because what if they want to reinstall/repair after making a small mistake, and aren't familiar with php?
Just make sure that you have a notice for them to delete it after use.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm