scar5308 Posted November 26, 2006 Share Posted November 26, 2006 OK, so trying to run before I can walk again but I learn better this way!I have a script that requires the path to a folder to be inserted on this line: [code] $config->dir = "/home/site/public_html/folder/lang_sets/";[/code] where lang_sets is the folder name.I want to create an install script (install.php) that asks the user to input the path or can auto detect it. I also need to make the script create an array of languages the user wants to use from a dropdown list - language names and id; en, fr, de etc.These values are then written to config.php.config.php:[code]#this sets the root path to the language files class object {}; $config = new object; $config->dir = "/home/site/public_html/folder/lang_sets/"; session_start(); # Create language array $language = array("en" => "English", "de" => "German", "lv" => "Latvian", "ru" => "Russian");[/code]config.php is then included in all the page files.There is slightly more to it than this but getting an idea of how to do this will certainly help me with the rest.I haven't had much luck in trying to work this out for myself so I hope someone can help.CheersSimon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.