If you are using *nix set the file, or directory permissions recursively, to
777.

If you want to let the users download the file it may be simpler to generate
the content and send it directly to them when they click on a link.

http://www.phpbuilder.com/mail/phplib-list/2001062/0017.php

explains but basically set the header using

header("Content-Type: application/force-download");

and then output the file.

Peter





-----------------------------------------------
Excellence in internet and open source software
-----------------------------------------------
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
-----------------------------------------------

-----Original Message-----
From: Patrick Latour [mailto:[EMAIL PROTECTED]]
Sent: 28 September 2002 20:42
To: Diana Castillo; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] export to csv file



----- Original Message -----
From: "Diana Castillo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 28, 2002 10:02 AM
Subject: [PHP-DB] export to csv file


> Hi, I want to export some fields on a regular basis from a table to a text
> file, preferable to the users local computer. I tried writing to a file
with
> fopen but I get "permission denied" when I try to open it for writing.
> What is the best solution?
> Thanks,
> Diana
>
> --
> See my web page:
> http://www.netrox.net/%7Ecastillo/hghindex.htm
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.391 / Virus Database: 222 - Release Date: 9/19/2002


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to