Hi, I'm trying to make my PHP script hide the location of a file and send the file through it instead of giving away the URL to the user. Here's my code:
That code works just fine in Opera, but when I try to download in IE, it claims it can't find the file. Can anyone help? Thanks.
$filename = "test.zip";
$realname = "0123test.zip";
$fullpath = "C:/nusphere/apache/htdocs/0123/" . $realname;
header("Content-Disposition: attachment; filename=\"$filename\"");
$fn=fopen("$fullpath" , "r");
EDIT: Also, that code appears to work just great when it's in a file by itself, but when I call it via script.php?var=abc etc.., it doesn't work.