| Gustav Wiberg 2007-09-05, 8:00 am |
| Hi!
Ok, I will try this... :-)
Best regards
/Gustav Wiberg
=20
-----Original Message-----
From: Armando [mailto:dijital@shaw.ca]=20
Sent: Wednesday, September 05, 2007 4:10 AM
To: Gustav Wiberg
Cc: 'Stut'; 'trystano@aol.com'; 'george.pitcher@ingenta.com'; 'php-windows@=
lists.php.net'
Subject: Re: [PHP-WIN] open/download file not under www-root
As long as the user that apache is running under has NTFS read=20
permissions to the target folder, then you should have no problems. A=20
quick and dirty force method that I use would be something like this:
$file =3D "x:\\path\\to\\the\\file.pdf";
header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header('Content-Length: ' . filesize($file));
header('Content-Disposition: attachment; filename=3D' . basename($file));
readfile($file);
Note the double backslashes! Cheers.
Armando
Gustav Wiberg wrote:
> Hi Stut!
>=20
> Exactly what does that mean? Do you have any references? Please send :-)
>=20
> Best regards
> /Gustav Wiberg
> =20
>=20
> -----Original Message-----
> From: Stut [mailto:stuttle@gmail.com]=20
> Sent: Tuesday, September 04, 2007 2:02 PM
> To: trystano@aol.com
> Cc: george.pitcher@ingenta.com; gustav@hmn.se; php-windows@lists.php.net
> Subject: Re: [PHP-WIN] open/download file not under www-root
>=20
> trystano@aol.com wrote:
s impossible???[color=darkred]
>=20
> Directly yes, but you can proxy it through a server-side script.
>=20
> -Stut
>=20
--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
No virus found in this outgoing message.
Checked by AVG Free Edition.=20
Version: 7.5.485 / Virus Database: 269.13.5/990 - Release Date: 2007-09-04 =
22:36
=20
|