PHP always wants to make html, how to avoid this?
Please explain.
If navigating to `http://localhost/path/to/file.php` serves the contents of the PHP file, then you must configure your webserver to execute PHP. The details depend on your environment, deployment setup, and web server software.
If navigating to `http://localhost/path/to/file.php` executes the PHP file, but shows the contents of the text-without-file-extension file, then the PHP script must instruct the browser how it should process the response using the `Content-Type` and `Content-Disposition` HTTP headers.
I want a php file to refuse download of a file it it was downloaded before
How do you define "it was downloaded before"? Downloaded by anybody once? Simply move the file after serving its contents. Download once per authenticated user? Set up persistent storage to track who downloaded what and when.