the_oliver Posted November 21, 2006 Share Posted November 21, 2006 Hello. Is there a way i can use a php script to edit lines in a .cfg file?I would like it to do something like: show what the file says, then optionaly change line [i]a number[/i] from [i]nost type ping_check[/i]to[i]host do http_check[/i] (or whatever the user selects)Also could this be done if the .cfg file is on a diffrent server?Thanks Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted November 22, 2006 Share Posted November 22, 2006 See the parse_ini_file function.http://www.php.net/parse_ini_fileAs far as it being on another server, yes, in a very round about way. If it's another web server, you could use the ftp functions to get and put the file. If it's a server on an intranet, you could configure it to pull from that server's shared directories, assuming the permissions were set correctly. Or, you could use WebDAV if the server has it. 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.