The easiest way would probably be to let your users submit the server type, ip, environment, etc in a html form, and update your ini file with a php script. To get you started on form submission: http://www.w3schools.com/php/php_forms.asp
then to write content into a file: http://www.php.net/manual/en/function.file-put-contents.php or more generally, http://www.php.net/manual/en/ref.filesystem.php However, as you will indirectly allow users to write files in your server, you must be super careful securing your script - protect the access to the form with a password, validate all form values against your expected entries with a white list if you can, or at least escape all characters which could be shell commands (http://nz.php.net/manual/en/function.escapeshellcmd.php) 2009/10/27 newbie01 php <[email protected]> > > > Hi all, > > Am very, very, very new to PHP and not sure if I should be posting > this to a Javascript or PHP forum so I posed the question on both > FORUM. > > Basically, I am looking for something like an INI editor of sort that > I can use to let users modify delimited files which are in actual fact > my INI file for my scripts on a UNIX box: > > Below is an example of what the delimited file may look like: > > Servername:OS:IPAddress:TypeofServer:Description: > SERVER01:AIX:1.2.3.1:PROD:Online Server: > SERVER02:Solaris:1.2.3.2:DEV:Online Dev Server: > SERVER03:Linux:1.2.3.3:TEST:Online Test Server: > SERVER04:Windows:1.2.3.4:PROD:Timesheet PROD Server: > SERVER05:HP:1.2.3.5:PROD:Candidate PROD Server: > > I want to be able to provide the user with the list of directory on > the server, and when they click on one of the files on the directory > listing, it should allow them to load the file in some kind of form > based web page and then they can make the changes and save the file. > At the moment, users are going to the server and modifying the file > manually via UNIX's vi and it is very prone to errors. > > Does anyone have an example of what I am wanting to do? > > Any suggestion will be very much appreciated. > > Thanks in advance. > > > > -- Mikael Letang Mobile: 021 027 436 45 Skype: mikaelletangns --~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected] -~----------~----~----~----~------~----~------~--~---
