How can I use PHP’s include function to include a file and then modify the headers so it forces – at least that’s how it’s called – browsers to download ITSELF (the PHP file). Is it possible to also modify the preset save name, in order to change the extension from *.php to something else?
Thanks in advance!
PHP include function will parse the file. What you want to do is use file_get_contents or readfile.
Here’s an example from the readfile documentation:
Change the headers to suit your particular needs. Check out the above links for more info.