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. Link to comment https://forums.phpfreaks.com/topic/221314-how-to-read-edit-and-write-a-configuration-file/ 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. Link to comment https://forums.phpfreaks.com/topic/221314-how-to-read-edit-and-write-a-configuration-file/#findComment-1145722 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.