kinderjit
02-22-2008, 01:46 AM
hello alls,
I want to download a file with PHP and this is my code.......
<?
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=".$filename."");
header('Content-Length: '.filesize($fileName));
readfile("$fileName");
?>
This is giving me to download the file but the problem is this that it always close the main window.How can i handle this problem.now i am using this code by window.open with a pop-up option but i have idea about how can i hide the pop up if any have idea for this Pls tell me.
Thanks in advance......
Kinderjit singh........
I want to download a file with PHP and this is my code.......
<?
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=".$filename."");
header('Content-Length: '.filesize($fileName));
readfile("$fileName");
?>
This is giving me to download the file but the problem is this that it always close the main window.How can i handle this problem.now i am using this code by window.open with a pop-up option but i have idea about how can i hide the pop up if any have idea for this Pls tell me.
Thanks in advance......
Kinderjit singh........