Welcome Guest, Not a member yet? Register   Sign In
force_download not work? [FIXED]
#1

[eluser]Ahmed Nuaman[/eluser]
Hello everyone.

I was using 'force_download' method successfully until recently. There's been no major changes in my code that I can think of that may affect it.

This is the set up.

File is located here: /home/folder/datafiles/somefile.zip
HTML root is here: /home/folder/wwwroot/

So, my script enters the following variables into the 'force_download' function:

Code:
force_download('somefile.zip',file_get_contents('/home/folder/datafiles/somefile.zip'));

This, however, does not work. It causes the error in Mozilla browsers saying:
Quote:XXX could not be saved because the source file could not be read

Any ideas?
#2

[eluser]saiprasad.ch[/eluser]
Maybe because the original file outside the "HTML Root".




Theme © iAndrew 2016 - Forum software by © MyBB