Home > Concepts and Solutions
Concepts and Solutions
This section contains tips and techniques I picked up and would like to share. Each article is meant to be short to provide quick reference for concepts and solutions to problems I encountered in the course of my work.

Browser Downloading Script Instead of File
User Rating: / 2
Written by Philip L Yuson   


  • Click on a document and instead of downloading the document, the browser is downloading the PHP script. When you save it, the document is saved, but the document name is the script name instead. Example, click on a link to a document called 'Document.pdf'. The browser says it will download a PHP script called 'download.php'. 
  • When you save the file, it is actually the Document.pdf but saved as download.php.
  • Apache is executing the script and not downloading the script.

Page 3 of 3
Copyright: © 2019 Philip Yuson