php - How to send the content of an external file to printer? -


i want print (printer, not screen) content of file via php script.

how do this?

update

php cannot access hardware. not considered "possible."

see:

however, first link shows, done javascript. can output javascript in way similar methods shown on first link force browser show print dialog box.

original

you can use file_get_contents print files variable or output stream.

$filecontents = file_get_contents("myfilename.txt"); print $filecontents; 

you can include files php interpretation.


Comments

Popular posts from this blog

how to build hyperlink for query string in php -

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

queue - mq_receive: message too long -