avatar.alex Posted March 19, 2007 Share Posted March 19, 2007 I am creating a script but I want it to be avalible for people that know nothing about php. so I am creating a /install/ folder in the zip file I just need alittle help I want the user to just be able to upload it on the website set the config.php file to permission 777 and then run EX: http://www.users-site.com/LMS/install/ im just stuck I know basic PHP coding its just the config and installing scripting im stuck on. I want the /install/ folder to be able to write the config.php file with the DB name, pass, username (sorry if I left anything out) and add the tables to the DB so if someone could help me out I would really apperiate it. Link to comment https://forums.phpfreaks.com/topic/43407-config-help/ Share on other sites More sharing options...
Glyde Posted March 20, 2007 Share Posted March 20, 2007 If you're writing an SQL based script, I hope you know how to create tables in SQL. If not, read up on the SQL manual. Otherwise, as for managing files, just check: if (!is_writable("yourconfigfile.php")) { // Config file can't be written to } else { $fp = fopen("yourconfigfile.php", "w+"); fwrite($fp, "filecontentstowrite"); fclose($fp); } Link to comment https://forums.phpfreaks.com/topic/43407-config-help/#findComment-210864 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.