473,387 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Writing to a Local File

We have a PHP/MySQL database application. A user would like to be able
to run a routine to read selected data from the database and export a
flat file to their local C: drive. After reviewing the documentation
and posts, it is not clear how to do this, or even if it is allowed by
the browser. If someone could point us in the right direction, we
would greatly appreciate it.

The application is hosted on a Linux server.
The users are required to use Internet Explorer running on Windows 2000
or XP (we also use VBScript).

Thanks!

Nov 21 '06 #1
1 1630
On 21 Nov 2006 10:56:54 -0800, hi***********@yahoo.com wrote:
>We have a PHP/MySQL database application. A user would like to be able
to run a routine to read selected data from the database and export a
flat file to their local C: drive. After reviewing the documentation
and posts, it is not clear how to do this, or even if it is allowed by
the browser. If someone could point us in the right direction, we
would greatly appreciate it.

The application is hosted on a Linux server.
The users are required to use Internet Explorer running on Windows 2000
or XP (we also use VBScript).
You can't write to specific locations on the user's computer directly; this
would be a security nightmare. You can offer a file that the user can download
and save to the location of their choosing, however.

For example, you could use PHP to print out information in CSV (comma
separated variables) format. The user can use "Save As" or the equivalent for
their browser to save it to a file. You can use the Content-type and
Content-disposition headers to mark the type of the output, which may influence
how the browser processes it (e.g. open in Excel, save to a file, etc.)

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Nov 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Peter A. Schott | last post by:
If I want to verify that a file has finished writing before deleting the remote file, what would be the best method? Current code on Python 2.4: #filename - remote FTP server File Name...
3
by: Ian Davies | last post by:
Hello I have the following code which changes directory, creates a file and then writes rows to it. It works fine except the file is created in the folder the php script is in instead of the...
4
by: Jens Mittag | last post by:
Hi! In my code, I have an array of a structure, which I want to save to a binary file. When the array is just created, everything works fine, but when I change contents of the array, saving...
2
by: Joergen Bech | last post by:
Trying to write an xml file from within a Session. Works fine if I do it in the Application_Start event of Global.asax, but not in the Page_Load event of an aspx page. If I give "Everyone" write...
0
by: Yunus's Group | last post by:
Yunus's Group May 23, 3:36 pm show options Newsgroups: microsoft.public.dotnet.languages.vb From: "Yunus's Group" <yunusasm...@gmail.com> - Find messages by this author Date: 23 May 2005...
12
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My...
2
by: totoro2468 | last post by:
Here is my code and output. Why is it writing to the array incorrectly, when I rewinded the file to the beginning? CODE: void ReadString (char *filename, int *lengthPtr) { FILE *ifp; char...
3
by: Barry Flynn | last post by:
Hi I am working with a VB 2005 program which has been converted from VB6. It writes data out to a flat file, with code like the following line WriteLine(riFileNo, "Hist", lsAssetID,...
4
by: Gilles Ganault | last post by:
Hello I'm stumped as to why PHP fails writing into a text file, with the script being called through Apache: ============== # pwd /usr/local/www/data/ ============== # ll
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.