Current location: Hot Scripts Forums » Programming Languages » PHP » [SOLVED] Exporting a csv file


[SOLVED] Exporting a csv file

Reply
  #1 (permalink)  
Old 05-19-08, 07:24 PM
phpdoctor's Avatar
phpdoctor phpdoctor is offline
Code Guru
 
Join Date: Feb 2007
Location: New Zealand
Posts: 767
Thanks: 4
Thanked 2 Times in 2 Posts
Spin [SOLVED] Exporting a csv file

Hay,
I have a csv that needs to be exported...
When the csv is generated (done that) i need it to come up with the download box...
Is it possible to make the csv file temporary or unaccessable directly also? i dont want other people downloading it...

How do i go about this?
Thanks,
Lex
__________________
01010000 01001000 01010000
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 05-20-08, 01:19 AM
Jay6390's Avatar
Jay6390 Jay6390 is offline
Code Master
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
Hey Lex. You will need to output the correct headers for the file to force the download, and then echo out the contents directly afterwards (look for the force download examples in the manuals header function pages

Jay
__________________
Useful Tutorials
[ PHP Video-1-2-3 ] [ MySQL 1-2-3 ]
For any php function reference type

www.php.net/FunctionName
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 05-20-08, 05:31 PM
phpdoctor's Avatar
phpdoctor phpdoctor is offline
Code Guru
 
Join Date: Feb 2007
Location: New Zealand
Posts: 767
Thanks: 4
Thanked 2 Times in 2 Posts
Oh sweet thats better... i dont use headers much so never thought of that at all lol

Thanks
__________________
01010000 01001000 01010000
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP script that knows to read csv file ELV1I2 Script Requests 5 08-05-07 04:19 AM
how to read file in csv format in java n find word using tokenizer mizfifa Everything Java 8 11-07-06 06:39 AM
CSV File Andy128 PHP 1 09-25-06 03:53 AM
Error message not getting displayed. sanjeet Windows .NET Programming 0 12-20-05 11:48 AM
CSV file..how to?? goldbidders The Lounge 0 01-11-05 08:47 AM


All times are GMT -5. The time now is 06:44 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.