Hello, John.

Just use such code:

  header("Content-type: application/octet-stream");
  header("Content-Disposition: attachment; filename=\"$item[file_name]\"");
  header("Content-length: ".strlen($item[file_content]));
  echo $item[file_content]

This should work...

--
============
Mike Tsapenko
Chief of Web-development Dept.
AlarIT
http://www.AlarIT.com


"John Hegele" <[EMAIL PROTECTED]> сообщил/сообщила в новостях
следующее: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm currently building a site for a band and one of the features I'd like
to
> offer is vCalendar files that the user can download.  I'd like to be able
to
> pull values from a database to use in the file, but, rather than having
the
> actual file on the server, I was hoping that I could create the file
> dynamically when the user clicks on a link.  I think this is possible from
> some information I've come across.
>
> My question here is not regarding anything having to do with the database,
> I'm very familiar with how to pull data from a database with PHP.  I just
> can't figure out how I can generate a file, fill it with values from the
> database and allow the user to download it without the file ever really
> existing on the server.
>
> Thanks in advance for any help you can give.
>
> John
>
>



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

Reply via email to