Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading from ini files 2

Status
Not open for further replies.

fergmj

Programmer
Feb 21, 2001
276
US
I have an application that stores info in an ini file in this format:

[location one]
33="11:00:00 PM", "11:30:00 PM", "WRC", "4", "ftplocation"

Obviously, the strings don't make a lot of sense to anyone but me so i
need a way for a user to edit them. I'd like to put it into a web page and
when they change the strings, save the changes back to a web page.

Does anyone know how to do this?

Thanks.

Mindy
 
you'll have to be more specific about what you want done with the data. but basically, here's what you'll do.
read the file in line by line.
for each line, split it apart into the individual fields.
display the file however you want on the page, probly with each field named something so the user can understand it.
accept user imput on what to change,
reformat it to go into your file,
put it in the file. "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
 
Hi,

There is another great way of handling inifiles:

Module Config-IniFiles

You can read sections,groups,parameters,comments and write it back to the inifile.

Hope this helps.

Thierry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top