Do you have a question? Post it now! No Registration Necessary. Now with pictures!
November 21, 2006, 6:56 pm
rate this thread
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).
Re: Writing to a Local File
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 :: email@example.com :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool