PHP file download to client
Posted: Fri Jul 03, 2009 5:55 pm
Is there a way to send a file from server to client, without the Save as dialog box ?
What I'm trying to do is to send a file that I previously created in php (a report that the client requests), and then run in the client a javascript code like this:
var wshellobj = new ActiveXObject("WScript.Shell");
wshellobj.Run('type archivocreado.txt > LPT1');
I know what you could be thinking, but the client needs a report that has to be printed in a Epson FX-1170 in LPT1 port, in Ascii, and they say that they don't want the application to ask for confirmation before printing. They need that once the bill is done, it gets printed inmediately.
This is for a local network, using a web application created in php and mysql.
Thanks in advance.
What I'm trying to do is to send a file that I previously created in php (a report that the client requests), and then run in the client a javascript code like this:
var wshellobj = new ActiveXObject("WScript.Shell");
wshellobj.Run('type archivocreado.txt > LPT1');
I know what you could be thinking, but the client needs a report that has to be printed in a Epson FX-1170 in LPT1 port, in Ascii, and they say that they don't want the application to ask for confirmation before printing. They need that once the bill is done, it gets printed inmediately.
This is for a local network, using a web application created in php and mysql.
Thanks in advance.