Jump to content

jdavis

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jdavis's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I am developing a PHP/MySQL project and as part of my initial setup and configuration scripts, the users can select a skin for the application, and a variable value ($skin) is updated to set the current skin, this works ok on it's own, but currently the user must manually type the skin name in a free-text box. Ideally this needs to be a drop-down option box, and I would like this to be populated by listing the sub-folders within the '/skins' folder, so that it's always up to date. The folder structure looks like this: /skins /skins/skin1 /skins/skin2 /skins/skin3 How can I use PHP to generate a list of the current sub-directories in 'skins' and populate the drop-down list? thanks, Jonathan
  2. Thanks for all the great advice, I have created an install script that writes the values to the config.php, and then created an admin screen by loading all the current variables back into the form and re-writing the file back again. Not the best way I'll admit, and it will probably move to MySQL in the future, but it works great for what I need! thanks again, Jonathan
  3. I am currently building a PHP app, and some of the configuration is stored in a 'config.php' file which is created during the install. After install I would like for the users to update these values separately. for example: line 5 of config.php is: $language = 'english'; and this may need updating from the admin screen (using results from a drop down list of languages), without touching the rest of the file. Is there any way to locate and update a single line of the config file in my php script? thanks, Jonathan
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.