I’m working on a WordPress theme which needs abit of configuration to be working properly.
When i say configuration, i mean config.php needs to be edited slightly (setting some variables value).
Now i was wondering if it is possible to be able to go into a zip file, make a complete temporary duplicate (for a specific user. Maybe using session ID’s?) AND edit the config.php file in the duplicate to set some variables value. Then close the temporary zip file and echo a link out to the file for the user, ready for download.
The variables value that will be set will be from a form on my site where users will download the theme.
Is this just wishful thinking, or do I have a chance?
Thanks!
You can extract the file, change it, and then re-add it back to the archive (assuming that you have the
ZipArchiveclass installed).