I'm pretty sure I just don't get the concept, but I'm stuck. The task: Assemble a php file from several php modules. Let's say we have a file1.php and a file2.php lying on a server. I now want to assemble those two files to a third php file, lets call it alltwo.php. This file (alltwo.php) will be offered as a download. I could do that quick an dirty by file_put_content, but as I understand it is no good idea to build php stuff on the fly, because it is too risky. All the example codes work with .txt files for a good reason I presume.
The most simple trick with include wont work, because I don't want the HTML output as a result but a genuine php file with the code from file1 and file2 in it. No changes, just one module after the other.
Tell me I'm stupid, thats okay. But maybe you can give me a hand.