leke Posted December 11, 2010 Share Posted December 11, 2010 Hi, I've been googling for a while now for an example of how to read, edit and write a configuration file. This part was easy to find... <?php $icon_settings = parse_ini_file("test.desktop"); print_r($icon_settings); ?> ...the above code works great, but how do I edit and write back a configuration file like this... #!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Name=Firefox Web Browser Comment=Browse the World Wide Web GenericName=Web Browser Exec=firefox %u Terminal=false X-MultipleArgs=false Type=Application Icon=firefox # ... and so on back to the drive? Thanks. Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted December 11, 2010 Share Posted December 11, 2010 Have the value of $icon_settings put into a textarea inside a form, then have it write to a file on submission. http://uk2.php.net/fwrite James. 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.