PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Can any one direct me to any articles of information on creating temporary files on the fly.
I tried searching for it but did'nt get much.
I need to allow my customers to click on a button and the script should create a file, which is attached and send to the users database. The file is a iif file for quickbooks. I dont want to store the file just send it as a attachment.
volka wrote:do you want to send it as mail-attachment or do you want the client's browser to show the "save as"-dialog or what is that "users database"?
I want it as a mail attachment.
The file to be geerated is a simple tab delimited text file.
php's own mail-function is like the old cli mail command. It's knows nothing about attachments, html-mail and so on. But nevertheless it is possible to use those features as they were set on top of the old protocol.
The online manual for mail() links to two other pages. The first describes how mime-mails (with or without attachments) are structured and how you may create them with mail(). The second takes you to PEAR's Mail_Mime packages.
There are a lot more packages/classes that simplify mime-mails, e.g. at phpguru.org