This is what I currently have. In chrome it saves the file immediately to the downloads folder. In firefox it gives you the option of saving or opening, but still doesn't let you choose where to save the file.
header('Content-type: text/plain');
header('Content-Disposition: attachment; filename="' . $filename . '"');
print file_get_contents($dir . $filename);
Is there any way to let the user choose where the file is saved/what the file is named?