$file_dl="Event Log Cleaner.exe";
header('Content-disposition: attachment; filename=$file_dl');
header('Content-type: application/exe');
readfile('../downloads/$file_dl');
Trouble with string
Page 1 of 12 Replies - 241 Views - Last Post: 20 December 2012 - 09:08 AM
#1
Trouble with string
Posted 20 December 2012 - 08:50 AM
Trying to replace file name with string in forced download, but get string for file name instead of contents of string
Replies To: Trouble with string
#2
Re: Trouble with string
Posted 20 December 2012 - 08:56 AM
Single quotes do not evaluate variables. Try either of the following :
Or you could create the full string first & then pass it :
readfile('../downloads/'.$file_dl);
readfile("../downloads/$file_dl");
Or you could create the full string first & then pass it :
$file = '../downloads/'.$file_dl; readfile($file);
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|