Re: Problemas con MAC && PHP

From: Date: Tue, 16 Sep 2003 00:52:12 +0000
Subject: Re: Problemas con MAC && PHP
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-40490@lists.php.net to get a copy of this message
muchas gracias a todos !!!! ----- Original Message ----- From: <desa15@necso.es> To: <lista@phpes.com> Sent: Tuesday, September 16, 2003 6:26 AM Subject: RE: [PHP-ES] Problemas con MAC && PHP Hola, yo te paso mis headers que uso en un script para hacer download, y te fijas si te sirve. Más que nada para que veas las diferencias, de como se contruyen los headers dependiendo del navegador. if (!empty($file['file_data'])) { if (get_user_os() == "MAC") { header("Content-Type: application/x-unknown\n"); header("Content-Disposition: attachment; filename=\"".$file ['file_name']."\"\n"); } elseif (get_browser_info() == "MSIE") { $disposition = (!eregi("\.zip$", $file['file_name']) && $action ! = "zip" && $action != "lightbox") ? 'attachment' : 'inline'; header("Content-Disposition: $disposition; filename=\"".$file ['file_name']."\"\n"); header("Content-Type: application/x-ms-download\n"); } elseif (get_browser_info() == "OPERA") { header("Content-Disposition: attachment; filename=\"".$file ['file_name']."\"\n"); header("Content-Type: application/octetstream\n"); } else { header("Content-Disposition: attachment; filename=\"".$file ['file_name']."\"\n"); header("Content-Type: application/octet-stream\n"); } header("Content-Length: ".$file['file_size']."\n\n"); echo $file['file_data']; } Un saludo, Danny --------------------------------------------------------------------- Archivo On-line: http://www.phpes.com/ via news: news://news.phpes.com/ Manual PHP en español: http://www.php.net/manual/es/ Para dar de baja la suscripción, mande un mensaje a: lista-unsubscribe@phpes.com

« previous php.general.es (#40490) next »