inpreet@gmail.com (Inpreet) wrote in
news:3abb263e.0504070632.4616f72d@posting.google.c om:
[color=blue]
> Hello
> I am using:
> ************************************************** *********************[/color]
**[color=blue]
> header("Content-Type:application/force-download",false);
> header("Content-Disposition: attachment; filename= "
> .basename($file));
> @readfile($file);
> ************************************************** *********************[/color]
**[color=blue]
> to let user get popup window with options to download file on his
> local machine.
> But particuler this line:
> ************************************************** *********************[/color]
**[color=blue]
> header("Content-Disposition: attachment; filename= "
> .basename($file));
> ************************************************** *********************[/color]
**[color=blue]
> is creating problem in code. Download file functionality is working
> fine, no problems in that. But it starts creating javascript errors on
> page.Javascript Error: Unspecified error.[/color]
I'm not sure if this is the problem, but it looks like you have an extra
space after the filename= portion of the header. See if removing that
space fixes the error.
hth
--
Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources