title: PHP "Save as..." file
body: <p>I want to allow users to download a specific file from the server and let them choose the name of the file.</p>
  
  <p>It is a JSON file.</p>
  
  <p>I have the following PHP script that works but it is naming the file automatically:</p>
  
  <pre><code>if (file_exists($myFile)){
      header ("Content-Type: application/download");
      header ("Content-Disposition: attachment; filename=$myFile");
      header("Content-Length: " . filesize("$myFile"));
      $fp = fopen("$myFile", "r");
      fpassthru($fp);
  } else {
      echo "no file exists";
  };  
  </code></pre>