Q:

how to download a file into a specified directory in php?

How i can download a csv file into a specified directory.?
Now I used this code,
header("Location:uploads/".$dire);
header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=".$nn);
header("Pragma: no-cache");
header("Expires: 0");   

Here, $dire is the sub directory of upload folder and $nn is the csv file name.
I want to download this $nn file and saved in a specified directory $dire.
But the it shows an error
Thanks in advance.

A:

You can't control that behviour of client (webbrowser).

