Jump to content

File download is not using right name


rain13

Recommended Posts

Hello.

I made simple php script to download attachments but I have problem that instead of my_file.txt I get upload.php for file name:

<?php

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-description: File Transfer");
header("Content-type: application");
header('Content-Disposition: attachment; filename="my_file.txt"');
header("Content-Transfer-Encoding: binary");
header("Content-Length: 5");


echo "Hello";

?>

Any suggestions?

Edited by SoItBegins
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...