[PHP] It opens the file instead downloading

2004-05-05 Thread Phpu
Hi, I have this script: $filename=plenar.mid; $file_to_download=files/plenar123.mid; $user_agent = strtolower ($_SERVER[HTTP_USER_AGENT]); header( Content-type: application/force-download ); if ((is_integer (strpos($user_agent, msie))) (is_integer (strpos($user_agent, win {

[PHP] It opens the file instead downloading

2004-05-05 Thread Phpu
Hi, I have this script taken form php.net $filename=plenar.mid; $file_to_download=files/plenar123.mid; $user_agent = strtolower ($_SERVER[HTTP_USER_AGENT]); header( Content-type: application/force-download ); if ((is_integer (strpos($user_agent, msie))) (is_integer

Re: [PHP] It opens the file instead downloading

2004-05-05 Thread John W. Holmes
From: Phpu [EMAIL PROTECTED] header( Content-type: application/force-download ); if ((is_integer (strpos($user_agent, msie))) (is_integer (strpos($user_agent, win { header( Content-Disposition: filename=.$filename); } else { header( Content-Disposition: attachment;

Re: [PHP] It opens the file instead downloading

2004-05-05 Thread FanneHH Adevarap
I have *.mid files. I need a script that works in almost all browsers. - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: Phpu [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 10:51 PM Subject: Re: [PHP] It opens the file instead downloading From: Phpu