Feb 142011

Suppose you have a script in PHP and you want to print on the system’s default printer, you can use the function

system (<command>, $retval)

The following example shows the printing of a content including a variable coming from the PHP script:

system('echo "'.$message.'"|lpr -o page-left=35 ', $retval );

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>