Thanks to this topic I'm able to generate one single text file and download it on the fly. But I would like to generate two separated text files. My code seems like this:
$status = //math
if(status)
header("Content-type: text/plain");
header("Content-Disposition: attachment; filename=config.txt");
//...config text
include 'test.php';
Test.php file:
<?php
$timeout = "time";
header("Content-type: text/plain");
header("Content-Disposition: attachment; filename=timout.xml");
echo $timeout;
?>
the timeout.xml text is being included inside config.txt, generating only the timout.xml file to download. Is there a way to generate two separated text files to download on the fly?