Have a abstract how-to question which I haven't found a solution. Lets say you built a plugin for a CMS like wordpress, I'm using a MCMS called GetSimple. And now within that plugin.. when a button is clicked by the user... two external php files have their code ran and their output taken and put collectively into a single static file.. say a html or css file.
So then in this kind of scenario... how can you (within the plugin) run an external php file without effecting the current page you are on, then take that output and put it as a string into a variable.. repeat this for another php file... then take the two string outputs, merge them... then put them into a single static file?
This has proven to me to be a very difficult task. for more details you can see this question: https://stackoverflow.com/questions/15080163/how-to-create-a-file-with-php
So how would you go about doing this? I was looking at the possibility of saving each file's output into separate xml files and then merging those xml files... but the problem still remains of running external php and putting that data somewhere without affecting the current page PHP you are on.