Re: Problemas con MAC && PHP
| From: | javierf at imagecampus dot com dot ar | Date: | Mon, 15 Sep 2003 23:59:20 +0000 |
| Subject: | Re: Problemas con MAC && PHP | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-40451@lists.php.net to get a copy of this message | ||
Querido Vicente y queridos amigos....
lamento desilusionarlos, pero este metodo tampoco funciona....
tengo que resignarme ?????
por favor que alguien me diga como puedo hacer....
Gracias...y sigo al aguardo del mesias...
Vicente <cppvic@yahoo.es> dijo:
>
> prueba esto:
>
> Si te da avisos de "Cannot add headers..." entonces
> pon: ob_start(); al principio de la página php.
> mas o menos así:
>
>
> <?
> ob_start();
>
> // **** el javascript de abajo fuera del codigo php
> //
> ?>
>
> <SCRIPT>
> // Distinguiendo Mac o PC
> if (navigator.appVersion.indexOf("Win")!=-1) {
> document.write('<?=$filename =
> $row_rsQuery_select['photoname'].".psd";?
>');
> } else {
> document.write('<?=$filename =
> "http://www.tusite.com/".$row_rsQuery_select
['photoname'].".psd";?>');
> }
> </SCRIPT>
>
> <?
> $size = filesize($filename);
> header("Pragma: no-cache");
> header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0");
> header("Expires: 0");
> header("Content-Transfer-Encoding: binary");
> header("Content-type: application/force-download");
> header("Content-Disposition: attachment; filename=$filename");
> header("Content-Length: $size");
> readfile("$filename");
>
> ?>
>
>
> ---------------------------------------------------------------------
> 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
>
>
--
________________________________________________________________