Hey John, > Same as you write any other file, fopen, fwrite, fclose, etc, then send > the > appropriate headers to trigger a download of the file (discussed on > here > plenty of times).
Yep, I got the working code to force a download from the list itself, but was outputting a file via readfile.. > <?php > > $fp = fopen('config.php'); > > fwrite("<?php\n\n\$somevar = " . $somevalue . ";\n\$somevar2 = " . > $somevalue2 . ";\n?>"); > // etc... (add in quotes around strings, of course) > > fclose($fp); Cool, got it. > You don't even have to actually write the file if you're just going to > send > them the data. You can send the download headers and then echo out what you >would have written to the file. The end result to the user will look like >they're downloading a file, although one never really existed on the server. Great, didnt think of that, will try it and post code back here if I run into problems. Thanks again, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php